Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device

ABSTRACT

A three-dimensional data encoding method includes: determining whether a first valid node count is greater than or equal to a first threshold value predetermined, the first valid node count being a total number of valid nodes that are nodes each including a three-dimensional point, the valid nodes being included in first nodes belonging to a layer higher than a layer of a current node in an N-ary tree structure of three-dimensional points included in point cloud data, N being an integer greater than or equal to 2; and, when the first valid node count is greater than or equal to the first threshold value, performing first encoding on attribute information of the current node, the first encoding including a prediction process in which second nodes are used, the second nodes including a parent node of the current node and belonging to a same layer as the parent node.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a U.S. continuation application of PCT InternationalPatent Application Number PCT/JP2020/037589 filed on Oct. 2, 2020,claiming the benefit of priority of U.S. Provisional Patent ApplicationNo. 62/910,012 filed on Oct. 3, 2019, the entire contents of which arehereby incorporated by reference.

BACKGROUND 1. Technical Field

The present disclosure relates to a three-dimensional data encodingmethod, a three-dimensional data decoding method, a three-dimensionaldata encoding device, and a three-dimensional data decoding device.

2. Description of the Related Art

Devices or services utilizing three-dimensional data are expected tofind their widespread use in a wide range of fields, such as computervision that enables autonomous operations of cars or robots, mapinformation, monitoring, infrastructure inspection, and videodistribution. Three-dimensional data is obtained through various meansincluding a distance sensor such as a rangefinder, as well as a stereocamera and a combination of a plurality of monocular cameras.

Methods of representing three-dimensional data include a method known asa point cloud scheme that represents the shape of a three-dimensionalstructure by a point group in a three-dimensional space. In the pointcloud scheme, the positions and colors of a point group are stored.While point cloud is expected to be a mainstream method of representingthree-dimensional data, a massive amount of data of a point groupnecessitates compression of the amount of three-dimensional data byencoding for accumulation and transmission, as in the case of atwo-dimensional moving picture (examples include MPEG-4 AVC and HEVCstandardized by MPEG).

Meanwhile, point cloud compression is partially supported by, forexample, an open-source library (Point Cloud Library) for pointcloud-related processing.

Furthermore, a technique for searching for and displaying a facilitylocated in the surroundings of the vehicle is known (for example, seeInternational Publication WO 2014/020663).

SUMMARY

There has been a demand for improving coding efficiency in athree-dimensional data encoding process and a three-dimensional datadecoding process.

The present disclosure is intended to provide a three-dimensional dataencoding method, a three-dimensional data decoding method, athree-dimensional data encoding device, or a three-dimensional datadecoding device capable of improving coding efficiency.

A three-dimensional data encoding method according to one aspect of thepresent disclosure includes: determining whether a first valid nodecount is greater than or equal to a first threshold value predetermined,the first valid node count being a total number of valid nodes that arenodes each including a three-dimensional point, the valid nodes beingincluded in first nodes belonging to a layer higher than a layer of acurrent node in an N-ary tree structure of three-dimensional pointsincluded in point cloud data, N being an integer greater than or equalto 2; when the first valid node count is greater than or equal to thefirst threshold value, performing first encoding on attributeinformation of the current node, the first encoding including aprediction process in which second nodes are used, the second nodesincluding a parent node of the current node and belonging to a samelayer as the parent node; and when the first valid node count is lessthan the first threshold value, performing second encoding on attributeinformation of the current node, the second encoding not including theprediction process in which the second nodes are used.

A three-dimensional data decoding method according to one aspect of thepresent disclosure includes: determining whether a first valid nodecount is greater than or equal to a first threshold value predetermined,the first valid node count being a total number of valid nodes that arenodes each including a three-dimensional point, the valid nodes beingincluded in first nodes belonging to a layer higher than a layer of acurrent node in an N-ary tree structure of three-dimensional pointsincluded in point cloud data, N being an integer greater than or equalto 2; when the first valid node count is greater than or equal to thefirst threshold value, performing first decoding on attributeinformation of the current node, the first decoding including aprediction process in which second nodes are used, the second nodesincluding a parent node of the current node and belonging to a samelayer as the parent node; and when the first valid node count is lessthan the first threshold value, performing second decoding on attributeinformation of the current node, the second decoding not including theprediction process in which the second nodes are used.

The present disclosure provides a three-dimensional data encodingmethod, a three-dimensional data decoding method, a three-dimensionaldata encoding device, or a three-dimensional data decoding devicecapable of improving coding efficiency.

BRIEF DESCRIPTION OF DRAWINGS

These and other objects, advantages and features of the disclosure willbecome apparent from the following description thereof taken inconjunction with the accompanying drawings that illustrate a specificembodiment of the present disclosure.

FIG. 1 is a diagram showing the structure of encoded three-dimensionaldata according to Embodiment 1;

FIG. 2 is a diagram showing an example of prediction structures amongSPCs that belong to the lowermost layer in a GOS according to Embodiment1;

FIG. 3 is a diagram showing an example of prediction structures amonglayers according to Embodiment 1;

FIG. 4 is a diagram showing an example order of encoding GOSs accordingto Embodiment 1;

FIG. 5 is a diagram showing an example order of encoding GOSs accordingto Embodiment 1;

FIG. 6 is a diagram showing an example of meta information according toEmbodiment 1;

FIG. 7 is a schematic diagram showing three-dimensional data beingtransmitted/received between vehicles according to Embodiment 2;

FIG. 8 is a diagram showing an example of three-dimensional datatransmitted between vehicles according to Embodiment 2;

FIG. 9 is a diagram that illustrates processes of transmittingthree-dimensional data according to Embodiment 3;

FIG. 10 is a diagram showing a structure of a system according toEmbodiment 4;

FIG. 11 is a block diagram of a client device according to Embodiment 4;

FIG. 12 is a block diagram of a server according to Embodiment 4;

FIG. 13 is a flowchart of a three-dimensional data creation processperformed by the client device according to Embodiment 4;

FIG. 14 is a flowchart of a sensor information transmission processperformed by the client device according to Embodiment 4;

FIG. 15 is a flowchart of a three-dimensional data creation processperformed by the server according to Embodiment 4;

FIG. 16 is a flowchart of a three-dimensional map transmission processperformed by the server according to Embodiment 4;

FIG. 17 is a diagram showing a structure of a variation of the systemaccording to Embodiment 4;

FIG. 18 is a diagram showing a structure of the server and clientdevices according to Embodiment 4;

FIG. 19 is a diagram illustrating a configuration of a server and aclient device according to Embodiment 5;

FIG. 20 is a flowchart of a process performed by the client deviceaccording to Embodiment 5;

FIG. 21 is a diagram illustrating a configuration of a sensorinformation collection system according to Embodiment 5;

FIG. 22 is a diagram showing an example of a volume according toEmbodiment 6;

FIG. 23 is a diagram showing an example of an octree representation ofthe volume according to Embodiment 6;

FIG. 24 is a diagram showing an example of bit sequences of the volumeaccording to Embodiment 6;

FIG. 25 is a diagram showing an example of an octree representation of avolume according to Embodiment 6;

FIG. 26 is a diagram showing an example of the volume according toEmbodiment 6;

FIG. 27 is a diagram for describing the encoding of the attributeinformation by using a RAHT according to Embodiment 7;

FIG. 28 is a diagram showing an example of setting a quantization scalefor each hierarchy according to Embodiment 7;

FIG. 29 is a diagram showing an example of a first code sequence and asecond code sequence according to Embodiment 7;

FIG. 30 is a diagram showing an example of a truncated unary codeaccording to Embodiment 7;

FIG. 31 is a diagram for describing the inverse Haar conversionaccording to Embodiment 7;

FIG. 32 is a diagram showing a syntax example of the attributeinformation according to Embodiment 7;

FIG. 33 is a diagram showing an example of a coding coefficient andZeroCnt according to Embodiment 7;

FIG. 34 is a flowchart of the three-dimensional data encoding processingaccording to Embodiment 7;

FIG. 35 is a flowchart of the attribute information encoding processingaccording to Embodiment 7;

FIG. 36 is a flowchart of the coding coefficient encoding processingaccording to Embodiment 7;

FIG. 37 is a flowchart of the three-dimensional data decoding processingaccording to Embodiment 7;

FIG. 38 is a flowchart of the attribute information decoding processingaccording to Embodiment 7;

FIG. 39 is a flowchart the coding coefficient decoding processingaccording to Embodiment 7;

FIG. 40 is a block diagram of an attribute information encoder accordingto Embodiment 7;

FIG. 41 is a block diagram of an attribute information decoder accordingto Embodiment 7;

FIG. 42 is a diagram showing an example of a first code sequence and asecond code sequence according to a modification of Embodiment 7;

FIG. 43 is a diagram showing a syntax example of the attributeinformation according to the modification of Embodiment 7;

FIG. 44 is a diagram showing an example of a coding coefficient,ZeroCnt, and TotalZeroCnt according to the modification of Embodiment 7;

FIG. 45 is a flowchart of the coding coefficient encoding processingaccording to the modification of Embodiment 7;

FIG. 46 is a flowchart of the coding coefficient decoding processingaccording to the modification of Embodiment 7;

FIG. 47 is a diagram showing a syntax example of the attributeinformation according to the modification of Embodiment 7;

FIG. 48 is a diagram showing a configuration of a three-dimensional dataencoding device according to Embodiment 8;

FIG. 49 is a diagram showing a configuration of a three-dimensional datadecoding device according to Embodiment 8;

FIG. 50 is a diagram for illustrating RAHT according to Embodiment 8;

FIG. 51 is a diagram for illustrating an integer-to-integer transformaccording to Embodiment 8;

FIG. 52 is a diagram for illustrating a hierarchical transformprocessing according to Embodiment 8;

FIG. 53 is a block diagram of a three-dimensional data encoding deviceaccording to Embodiment 8;

FIG. 54 is a block diagram of a lossless attribute information encoderaccording to Embodiment 8;

FIG. 55 is a block diagram of an integer transformer according toEmbodiment 8;

FIG. 56 is a block diagram of a three-dimensional data decoding deviceaccording to Embodiment 8;

FIG. 57 is a block diagram of a lossless attribute information decoderaccording to Embodiment 8;

FIG. 58 is a block diagram of an inverse integer transformer accordingto Embodiment 8;

FIG. 59 is a flowchart of a lossless attribute information encodingprocessing according to Embodiment 8;

FIG. 60 is a flowchart of a lossless attribute information decodingprocessing according to Embodiment 8;

FIG. 61 is a diagram showing an example configuration of an integer Haartransformer according to Embodiment 8;

FIG. 62 is a diagram showing an example configuration of an inverseinteger Haar transformer according to Embodiment 8;

FIG. 63 is a diagram showing a configuration of a three-dimensional dataencoding device according to Embodiment 8;

FIG. 64 is a diagram showing a configuration of a three-dimensional datadecoding device according to Embodiment 8;

FIG. 65 is a diagram showing a configuration of a three-dimensional dataencoding device according to Embodiment 8;

FIG. 66 is a diagram showing a configuration of a three-dimensional datadecoding device according to Embodiment 8;

FIG. 67 is a diagram showing an example configuration of a bitstreamaccording to Embodiment 8;

FIG. 68 is a diagram showing an example configuration of a bitstreamaccording to Embodiment 8;

FIG. 69 is a diagram showing a configuration of a three-dimensional dataencoding device according to Embodiment 9;

FIG. 70 is a diagram showing a configuration of a three-dimensional datadecoding device according to Embodiment 9;

FIG. 71 is a diagram showing an example configuration of a bitstreamaccording to Embodiment 9;

FIG. 72 is a diagram showing an example configuration of an integerRAHT/Haar transformer according to Embodiment 9;

FIG. 73 is a diagram showing an example configuration of an inverseinteger RAHT/Haar transformer according to Embodiment 9;

FIG. 74 is a flowchart of a three-dimensional data encoding processaccording to Embodiment 9;

FIG. 75 is a flowchart of a three-dimensional data decoding processaccording to Embodiment 9;

FIG. 76 is a diagram illustrating a prediction process according toEmbodiment 10;

FIG. 77 is a diagram illustrating a relation among nodes according toEmbodiment 10;

FIG. 78 is a diagram illustrating a first example of an encoding methodaccording to Embodiment 10;

FIG. 79 is a diagram illustrating a first example of a decoding methodaccording to Embodiment 10;

FIG. 80 is a diagram illustrating a second example of an encoding methodaccording to Embodiment 10;

FIG. 81 is a diagram illustrating a second example of a decoding methodaccording to Embodiment 10;

FIG. 82 is a diagram illustrating a third example of an encoding methodaccording to Embodiment 10;

FIG. 83 is a diagram illustrating a third example of a decoding methodaccording to Embodiment 10;

FIG. 84 is a diagram illustrating a fourth example of an encoding methodaccording to Embodiment 10;

FIG. 85 is a diagram illustrating a fourth example of a decoding methodaccording to Embodiment 10;

FIG. 86 is a diagram illustrating a fifth example of an encoding methodaccording to Embodiment 10;

FIG. 87 is a diagram illustrating a fifth example of a decoding methodaccording to Embodiment 10;

FIG. 88 is a flowchart of a three-dimensional data encoding processaccording to Embodiment 10;

FIG. 89 is a flowchart of a three-dimensional data decoding processaccording to Embodiment 10;

FIG. 90 is a diagram illustrating a prediction process according toEmbodiment 11;

FIG. 91 is a diagram illustrating a first example of an encoding processaccording to Embodiment 11;

FIG. 92 is a diagram illustrating a first example of a decoding processaccording to Embodiment 11;

FIG. 93 is a diagram illustrating an example syntax of an attributeinformation header according to Embodiment 11;

FIG. 94 is a diagram illustrating an example syntax of the attributeinformation header according to Embodiment 11;

FIG. 95 is a flowchart of a three-dimensional data encoding processaccording to Embodiment 11;

FIG. 96 is a flowchart of a three-dimensional data decoding processaccording to Embodiment 11;

FIG. 97 is a diagram illustrating a second example of the encodingprocess according to Embodiment 11;

FIG. 98 is a diagram illustrating an example syntax of the attributeinformation header according to Embodiment 11;

FIG. 99 is a diagram illustrating an example syntax of the attributeinformation header according to Embodiment 11;

FIG. 100 is a flowchart of a three-dimensional data encoding processaccording to Embodiment 11;

FIG. 101 is a flowchart of a three-dimensional data decoding processaccording to Embodiment 11;

FIG. 102 is a diagram illustrating a third example of the encodingprocess according to Embodiment 11;

FIG. 103 is a diagram illustrating an example syntax of the attributeinformation header according to Embodiment 11;

FIG. 104 is a diagram illustrating an example syntax of the attributeinformation header according to Embodiment 11;

FIG. 105 is a flowchart of a three-dimensional data encoding processaccording to Embodiment 11;

FIG. 106 is a flowchart of a three-dimensional data decoding processaccording to Embodiment 11;

FIG. 107 is a diagram illustrating an example in which the range andnumber of nodes to be referred to and included in a parent node groupare changed according to Embodiment 11;

FIG. 108 is a flowchart of a three-dimensional data encoding processaccording to Embodiment 11; and

FIG. 109 is a flowchart of a three-dimensional data decoding processaccording to Embodiment 11.

DETAILED DESCRIPTION OF THE EMBODIMENTS

A three-dimensional data encoding method according to one aspect of thepresent disclosure includes: determining whether a first valid nodecount is greater than or equal to a first threshold value predetermined,the first valid node count being a total number of valid nodes that arenodes each including a three-dimensional point, the valid nodes beingincluded in first nodes belonging to a layer higher than a layer of acurrent node in an N-ary tree structure of three-dimensional pointsincluded in point cloud data, N being an integer greater than or equalto 2; when the first valid node count is greater than or equal to thefirst threshold value, performing first encoding on attributeinformation of the current node, the first encoding including aprediction process in which second nodes are used, the second nodesincluding a parent node of the current node and belonging to a samelayer as the parent node; and when the first valid node count is lessthan the first threshold value, performing second encoding on attributeinformation of the current node, the second encoding not including theprediction process in which the second nodes are used.

According to the three-dimensional data encoding method, whether to usethe first encoding including a prediction process can be appropriatelyselected, and therefore, the encoding efficiency can be improved.

For example, the first nodes may include the parent node and nodesbelonging to the same layer as the parent node.

For example, the first nodes may include a grandparent node of thecurrent node and nodes belonging to a same layer as the grandparentnode.

For example, in the second encoding, a predicted value of attributeinformation of the current node may be set to zero.

For example, the three-dimensional data encoding method may furtherinclude generating a bitstream including attribute information of thecurrent node encoded and first information indicating whether the firstencoding is applicable.

For example, the three-dimensional data encoding method may furtherinclude generating a bitstream including attribute information of thecurrent node encoded and second information indicating the firstthreshold value.

For example, the three-dimensional data encoding method may furtherinclude: determining whether a second valid node count is greater thanor equal to a second threshold value predetermined, the second validnode count being a total number of valid nodes included in second nodesincluding a grandparent node of the current node and nodes belonging toa same layer as the grandparent node; when the first valid node count isgreater than the first threshold value, and the second valid node countis greater than or equal to the second threshold value, performing thefirst encoding on attribute information of the current node; and whenthe first valid node count is less than the first threshold value or thesecond valid node count is less than the second threshold value,performing the second encoding on attribute information of the currentnode.

A three-dimensional data decoding method according to one aspect of thepresent disclosure includes: determining whether a first valid nodecount is greater than or equal to a first threshold value predetermined,the first valid node count being a total number of valid nodes that arenodes each including a three-dimensional point, the valid nodes beingincluded in first nodes belonging to a layer higher than a layer of acurrent node in an N-ary tree structure of three-dimensional pointsincluded in point cloud data, N being an integer greater than or equalto 2; when the first valid node count is greater than or equal to thefirst threshold value, performing first decoding on attributeinformation of the current node, the first decoding including aprediction process in which second nodes are used, the second nodesincluding a parent node of the current node and belonging to a samelayer as the parent node; and when the first valid node count is lessthan the first threshold value, performing second decoding on attributeinformation of the current node, the second decoding not including theprediction process in which the second nodes are used.

According to the three-dimensional data decoding method, whether to usethe first decoding including a prediction process can be appropriatelyselected, and therefore, the encoding efficiency can be improved.

For example, the first nodes may include the parent node and nodesbelonging to the same layer as the parent node.

For example, the first nodes may include a grandparent node of thecurrent node and nodes belonging to a same layer as the grandparentnode.

For example, in the second decoding, a predicted value of attributeinformation of the current node may be set to zero.

For example, the three-dimensional data decoding method may furtherinclude obtaining first information indicating whether the firstdecoding is applicable, from a bitstream including attribute informationof the current node encoded.

For example, the three-dimensional data decoding method may furtherinclude obtaining second information indicating the first thresholdvalue, from a bitstream including attribute information of the currentnode encoded.

For example, the three-dimensional data decoding method may furtherinclude: determining whether a second valid node count is greater thanor equal to a second threshold value predetermined, the second validnode count being a total number of valid nodes included in second nodesincluding a grandparent node of the current node and nodes belonging toa same layer as the grandparent node; when the first valid node count isgreater than the first threshold value, and the second valid node countis greater than or equal to the second threshold value, performing thefirst decoding on attribute information of the current node; and whenthe first valid node count is less than the first threshold value or thesecond valid node count is less than the second threshold value,performing the second decoding on attribute information of the currentnode.

A three-dimensional data encoding device according to one aspect of thepresent disclosure includes a processor and memory. Using the memory,the processor: determines whether a first valid node count is greaterthan or equal to a first threshold value predetermined, the first validnode count being a total number of valid nodes that are nodes eachincluding a three-dimensional point, the valid nodes being included infirst nodes belonging to a layer higher than a layer of a current nodein an N-ary tree structure of three-dimensional points included in pointcloud data, N being an integer greater than or equal to 2; when thefirst valid node count is greater than or equal to the first thresholdvalue, performs first encoding on attribute information of the currentnode, the first encoding including a prediction process in which secondnodes are used, the second nodes including a parent node of the currentnode and belonging to a same layer as the parent node; and when thefirst valid node count is less than the first threshold value, performssecond encoding on attribute information of the current node, the secondencoding not including the prediction process in which the second nodesare used.

According to this configuration, since the three-dimensional dataencoding device can appropriately select whether to use the firstencoding including a prediction process, the three-dimensional encodingdevice can improve the encoding efficiency.

A three-dimensional data decoding device according to one aspect of thepresent disclosure includes a processor and memory. Using the memory,the processor: determines whether a first valid node count is greaterthan or equal to a first threshold value predetermined, the first validnode count being a total number of valid nodes that are nodes eachincluding a three-dimensional point, the valid nodes being included infirst nodes belonging to a layer higher than a layer of a current nodein an N-ary tree structure of three-dimensional points included in pointcloud data, N being an integer greater than or equal to 2; when thefirst valid node count is greater than or equal to the first thresholdvalue, performs first decoding on attribute information of the currentnode, the first decoding including a prediction process in which secondnodes are used, the second nodes including a parent node of the currentnode and belonging to a same layer as the parent node; and when thefirst valid node count is less than the first threshold value, performssecond decoding on attribute information of the current node, the seconddecoding not including the prediction process in which the second nodesare used.

According to this configuration, since the three-dimensional datadecoding device can appropriately select whether to use the firstdecoding including a prediction process, the three-dimensional datadecoding device can improve the encoding efficiency.

It is to be noted that these general or specific aspects may beimplemented as a system, a method, an integrated circuit, a computerprogram, or a computer-readable recording medium such as a CD-ROM, ormay be implemented as any combination of a system, a method, anintegrated circuit, a computer program, and a recording medium.

The following describes embodiments with reference to the drawings. Itis to be noted that the following embodiments indicate exemplaryembodiments of the present disclosure. The numerical values, shapes,materials, constituent elements, the arrangement and connection of theconstituent elements, steps, the processing order of the steps, etc.indicated in the following embodiments are mere examples, and thus arenot intended to limit the present disclosure. Of the constituentelements described in the following embodiments, constituent elementsnot recited in any one of the independent claims that indicate thebroadest concepts will be described as optional constituent elements.

Embodiment 1

First, the data structure of encoded three-dimensional data (hereinafteralso referred to as encoded data) according to the present embodimentwill be described. FIG. 1 is a diagram showing the structure of encodedthree-dimensional data according to the present embodiment. FIG. 1 is adiagram showing the structure of encoded three-dimensional dataaccording to the present embodiment.

In the present embodiment, a three-dimensional space is divided intospaces (SPCs), which correspond to pictures in moving picture encoding,and the three-dimensional data is encoded on a SPC-by-SPC basis. EachSPC is further divided into volumes (VLMs), which correspond tomacroblocks, etc. in moving picture encoding, and predictions andtransforms are performed on a VLM-by-VLM basis. Each volume includes aplurality of voxels (VXLs), each being a minimum unit in which positioncoordinates are associated. Note that prediction is a process ofgenerating predictive three-dimensional data analogous to a currentprocessing unit by referring to another processing unit, and encoding adifferential between the predictive three-dimensional data and thecurrent processing unit, as in the case of predictions performed ontwo-dimensional images. Such prediction includes not only spatialprediction in which another prediction unit corresponding to the sametime is referred to, but also temporal prediction in which a predictionunit corresponding to a different time is referred to.

When encoding a three-dimensional space represented by point group datasuch as a point cloud, for example, the three-dimensional data encodingdevice (hereinafter also referred to as the encoding device) encodes thepoints in the point group or points included in the respective voxels ina collective manner, in accordance with a voxel size. Finer voxelsenable a highly-precise representation of the three-dimensional shape ofa point group, while larger voxels enable a rough representation of thethree-dimensional shape of a point group.

Note that the following describes the case where three-dimensional datais a point cloud, but three-dimensional data is not limited to a pointcloud, and thus three-dimensional data of any format may be employed.

Also note that voxels with a hierarchical structure may be used. In sucha case, when the hierarchy includes n levels, whether a sampling pointis included in the n−1th level or its lower levels (the lower levels ofthe n-th level) may be sequentially indicated. For example, when onlythe n-th level is decoded, and the n−1th level or its lower levelsinclude a sampling point, the n-th level can be decoded on theassumption that a sampling point is included at the center of a voxel inthe n-th level.

Also, the encoding device obtains point group data, using, for example,a distance sensor, a stereo camera, a monocular camera, a gyroscopesensor, or an inertial sensor.

As in the case of moving picture encoding, each SPC is classified intoone of at least the three prediction structures that include: intra SPC(I-SPC), which is individually decodable; predictive SPC (P-SPC) capableof only a unidirectional reference; and bidirectional SPC (B-SPC)capable of bidirectional references. Each SPC includes two types of timeinformation: decoding time and display time.

Furthermore, as shown in FIG. 1 , a processing unit that includes aplurality of SPCs is a group of spaces (GOS), which is a random accessunit. Also, a processing unit that includes a plurality of GOSs is aworld (WLD).

The spatial region occupied by each world is associated with an absoluteposition on earth, by use of, for example, GPS, or latitude andlongitude information. Such position information is stored asmeta-information. Note that meta-information may be included in encodeddata, or may be transmitted separately from the encoded data.

Also, inside a GOS, all SPCs may be three-dimensionally adjacent to oneanother, or there may be a SPC that is not three-dimensionally adjacentto another SPC.

Note that the following also describes processes such as encoding,decoding, and reference to be performed on three-dimensional dataincluded in processing units such as GOS, SPC, and VLM, simply asperforming encoding/to encode, decoding/to decode, referring to, etc. ona processing unit. Also note that three-dimensional data included in aprocessing unit includes, for example, at least one pair of a spatialposition such as three-dimensional coordinates and an attribute valuesuch as color information.

Next, the prediction structures among SPCs in a GOS will be described. Aplurality of SPCs in the same GOS or a plurality of VLMs in the same SPCoccupy mutually different spaces, while having the same time information(the decoding time and the display time).

A SPC in a GOS that comes first in the decoding order is an I-SPC. GOSscome in two types: closed GOS and open GOS. A closed GOS is a GOS inwhich all SPCs in the GOS are decodable when decoding starts from thefirst I-SPC. Meanwhile, an open GOS is a GOS in which a different GOS isreferred to in one or more SPCs preceding the first I-SPC in the GOS inthe display time, and thus cannot be singly decoded.

Note that in the case of encoded data of map information, for example, aWLD is sometimes decoded in the backward direction, which is opposite tothe encoding order, and thus backward reproduction is difficult whenGOSs are interdependent. In such a case, a closed GOS is basically used.

Each GOS has a layer structure in height direction, and SPCs aresequentially encoded or decoded from SPCs in the bottom layer.

FIG. 2 is a diagram showing an example of prediction structures amongSPCs that belong to the lowermost layer in a GOS. FIG. 3 is a diagramshowing an example of prediction structures among layers.

A GOS includes at least one I-SPC. Of the objects in a three-dimensionalspace, such as a person, an animal, a car, a bicycle, a signal, and abuilding serving as a landmark, a small-sized object is especiallyeffective when encoded as an I-SPC. When decoding a GOS at a lowthroughput or at a high speed, for example, the three-dimensional datadecoding device (hereinafter also referred to as the decoding device)decodes only I-SPC(s) in the GOS.

The encoding device may also change the encoding interval or theappearance frequency of I-SPCs, depending on the degree of sparsenessand denseness of the objects in a WLD.

In the structure shown in FIG. 3 , the encoding device or the decodingdevice encodes or decodes a plurality of layers sequentially from thebottom layer (layer l). This increases the priority of data on theground and its vicinity, which involve a larger amount of information,when, for example, a self-driving car is concerned.

Regarding encoded data used for a drone, for example, encoding ordecoding may be performed sequentially from SPCs in the top layer in aGOS in height direction.

The encoding device or the decoding device may also encode or decode aplurality of layers in a manner that the decoding device can have arough grasp of a GOS first, and then the resolution is graduallyincreased. The encoding device or the decoding device may performencoding or decoding in the order of layers 3, 8, 1, 9 . . . , forexample.

Next, the handling of static objects and dynamic objects will bedescribed.

A three-dimensional space includes scenes or still objects such as abuilding and a road (hereinafter collectively referred to as staticobjects), and objects with motion such as a car and a person(hereinafter collectively referred to as dynamic objects). Objectdetection is separately performed by, for example, extracting keypointsfrom point cloud data, or from video of a camera such as a stereocamera. In this description, an example method of encoding a dynamicobject will be described.

A first method is a method in which a static object and a dynamic objectare encoded without distinction. A second method is a method in which adistinction is made between a static object and a dynamic object on thebasis of identification information.

For example, a GOS is used as an identification unit. In such a case, adistinction is made between a GOS that includes SPCs constituting astatic object and a GOS that includes SPCs constituting a dynamicobject, on the basis of identification information stored in the encodeddata or stored separately from the encoded data.

Alternatively, a SPC may be used as an identification unit. In such acase, a distinction is made between a SPC that includes VLMsconstituting a static object and a SPC that includes VLMs constituting adynamic object, on the basis of the identification information thusdescribed.

Alternatively, a VLM or a VXL may be used as an identification unit. Insuch a case, a distinction is made between a VLM or a VXL that includesa static object and a VLM or a VXL that includes a dynamic object, onthe basis of the identification information thus described.

The encoding device may also encode a dynamic object as at least one VLMor SPC, and may encode a VLM or a SPC including a static object and aSPC including a dynamic object as mutually different GOSs. When the GOSsize is variable depending on the size of a dynamic object, the encodingdevice separately stores the GOS size as meta-information.

The encoding device may also encode a static object and a dynamic objectseparately from each other, and may superimpose the dynamic object ontoa world constituted by static objects. In such a case, the dynamicobject is constituted by at least one SPC, and each SPC is associatedwith at least one SPC constituting the static object onto which the eachSPC is to be superimposed. Note that a dynamic object may be representednot by SPC(s) but by at least one VLM or VXL.

The encoding device may also encode a static object and a dynamic objectas mutually different streams.

The encoding device may also generate a GOS that includes at least oneSPC constituting a dynamic object. The encoding device may further setthe size of a GOS including a dynamic object (GOS_M) and the size of aGOS including a static object corresponding to the spatial region ofGOS_M at the same size (such that the same spatial region is occupied).This enables superimposition to be performed on a GOS-by-GOS basis.

SPC(s) included in another encoded GOS may be referred to in a P-SPC ora B-SPC constituting a dynamic object. In the case where the position ofa dynamic object temporally changes, and the same dynamic object isencoded as an object in a GOS corresponding to a different time,referring to SPC(s) across GOSs is effective in terms of compressionrate.

The first method and the second method may be selected in accordancewith the intended use of encoded data. When encoded three-dimensionaldata is used as a map, for example, a dynamic object is desired to beseparated, and thus the encoding device uses the second method.Meanwhile, the encoding device uses the first method when the separationof a dynamic object is not required such as in the case wherethree-dimensional data of an event such as a concert and a sports eventis encoded.

The decoding time and the display time of a GOS or a SPC are storable inencoded data or as meta-information. All static objects may have thesame time information. In such a case, the decoding device may determinethe actual decoding time and display time. Alternatively, a differentvalue may be assigned to each GOS or SPC as the decoding time, and thesame value may be assigned as the display time. Furthermore, as in thecase of the decoder model in moving picture encoding such asHypothetical Reference Decoder (HRD) compliant with HEVC, a model may beemployed that ensures that a decoder can perform decoding without failby having a buffer of a predetermined size and by reading a bitstream ata predetermined bit rate in accordance with the decoding times.

Next, the topology of GOSs in a world will be described. The coordinatesof the three-dimensional space in a world are represented by the threecoordinate axes (x axis, y axis, and z axis) that are orthogonal to oneanother. A predetermined rule set for the encoding order of GOSs enablesencoding to be performed such that spatially adjacent GOSs arecontiguous in the encoded data. In an example shown in FIG. 4 , forexample, GOSs in the x and z planes are successively encoded. After thecompletion of encoding all GOSs in certain x and z planes, the value ofthe y axis is updated. Stated differently, the world expands in the yaxis direction as the encoding progresses. The GOS index numbers are setin accordance with the encoding order.

Here, the three-dimensional spaces in the respective worlds arepreviously associated one-to-one with absolute geographical coordinatessuch as GPS coordinates or latitude/longitude coordinates.Alternatively, each three-dimensional space may be represented as aposition relative to a previously set reference position. The directionsof the x axis, the y axis, and the z axis in the three-dimensional spaceare represented by directional vectors that are determined on the basisof the latitudes and the longitudes, etc. Such directional vectors arestored together with the encoded data as meta-information.

GOSs have a fixed size, and the encoding device stores such size asmeta-information. The GOS size may be changed depending on, for example,whether it is an urban area or not, or whether it is inside or outsideof a room. Stated differently, the GOS size may be changed in accordancewith the amount or the attributes of objects with information values.Alternatively, in the same world, the encoding device may adaptivelychange the GOS size or the interval between I-SPCs in GOSs in accordancewith the object density, etc. For example, the encoding device sets theGOS size to smaller and the interval between I-SPCs in GOSs to shorter,as the object density is higher.

In an example shown in FIG. 5 , to enable random access with a finergranularity, a GOS with a high object density is partitioned into theregions of the third to tenth GOSs. Note that the seventh to tenth GOSsare located behind the third to sixth GOSs.

Embodiment 2

The present embodiment will describe a method of transmitting/receivingthree-dimensional data between vehicles.

FIG. 7 is a schematic diagram showing three-dimensional data 607 beingtransmitted/received between own vehicle 600 and nearby vehicle 601.

In three-dimensional data that is obtained by a sensor mounted on ownvehicle 600 (e.g., a distance sensor such as a rangefinder, as well as astereo camera and a combination of a plurality of monocular cameras),there appears a region, three-dimensional data of which cannot becreated, due to an obstacle such as nearby vehicle 601, despite thatsuch region is included in sensor detection range 602 of own vehicle 600(such region is hereinafter referred to as occlusion region 604). Also,while the obtainment of three-dimensional data of a larger space enablesa higher accuracy of autonomous operations, a range of sensor detectiononly by own vehicle 600 is limited.

Sensor detection range 602 of own vehicle 600 includes region 603,three-dimensional data of which is obtainable, and occlusion region 604.A range, three-dimensional data of which own vehicle 600 wishes toobtain, includes sensor detection range 602 of own vehicle 600 and otherregions. Sensor detection range 605 of nearby vehicle 601 includesocclusion region 604 and region 606 that is not included in sensordetection range 602 of own vehicle 600.

Nearby vehicle 601 transmits information detected by nearby vehicle 601to own vehicle 600. Own vehicle 600 obtains the information detected bynearby vehicle 601, such as a preceding vehicle, thereby obtainingthree-dimensional data 607 of occlusion region 604 and region 606outside of sensor detection range 602 of own vehicle 600. Own vehicle600 uses the information obtained by nearby vehicle 601 to complementthe three-dimensional data of occlusion region 604 and region 606outside of the sensor detection range.

The usage of three-dimensional data in autonomous operations of avehicle or a robot includes self-location estimation, detection ofsurrounding conditions, or both. For example, for self-locationestimation, three-dimensional data is used that is generated by ownvehicle 600 on the basis of sensor information of own vehicle 600. Fordetection of surrounding conditions, three-dimensional data obtainedfrom nearby vehicle 601 is also used in addition to thethree-dimensional data generated by own vehicle 600.

Nearby vehicle 601 that transmits three-dimensional data 607 to ownvehicle 600 may be determined in accordance with the state of ownvehicle 600. For example, the current nearby vehicle 601 is a precedingvehicle when own vehicle 600 is running straight ahead, an oncomingvehicle when own vehicle 600 is turning right, and a following vehiclewhen own vehicle 600 is rolling backward. Alternatively, the driver ofown vehicle 600 may directly specify nearby vehicle 601 that transmitsthree-dimensional data 607 to own vehicle 600.

Alternatively, own vehicle 600 may search for nearby vehicle 601 havingthree-dimensional data of a region that is included in a space,three-dimensional data of which own vehicle 600 wishes to obtain, andthat own vehicle 600 cannot obtain. The region own vehicle 600 cannotobtain is occlusion region 604, or region 606 outside of sensordetection range 602, etc.

Own vehicle 600 may identify occlusion region 604 on the basis of thesensor information of own vehicle 600. For example, own vehicle 600identifies, as occlusion region 604, a region which is included insensor detection range 602 of own vehicle 600, and three-dimensionaldata of which cannot be created.

The following describes example operations to be performed when avehicle that transmits three-dimensional data 607 is a precedingvehicle. FIG. 8 is a diagram showing an example of three-dimensionaldata to be transmitted in such case.

As FIG. 8 shows, three-dimensional data 607 transmitted from thepreceding vehicle is, for example, a sparse world (SWLD) of a pointcloud. Stated differently, the preceding vehicle createsthree-dimensional data (point cloud) of a WLD from information detectedby a sensor of such preceding vehicle, and extracts data having anamount of features greater than or equal to the threshold from suchthree-dimensional data of the WLD, thereby creating three-dimensionaldata (point cloud) of the SWLD. Subsequently, the preceding vehicletransmits the created three-dimensional data of the SWLD to own vehicle600.

Own vehicle 600 receives the SWLD, and merges the received SWLD with thepoint cloud created by own vehicle 600.

The SWLD to be transmitted includes information on the absolutecoordinates (the position of the SWLD in the coordinates system of athree-dimensional map). The merge is achieved by own vehicle 600overwriting the point cloud generated by own vehicle 600 on the basis ofsuch absolute coordinates.

The SWLD transmitted from nearby vehicle 601 may be: a SWLD of region606 that is outside of sensor detection range 602 of own vehicle 600 andwithin sensor detection range 605 of nearby vehicle 601; or a SWLD ofocclusion region 604 of own vehicle 600; or the SWLDs of the both. Ofthese SWLDs, a SWLD to be transmitted may also be a SWLD of a regionused by nearby vehicle 601 to detect the surrounding conditions.

Nearby vehicle 601 may change the density of a point cloud to transmit,in accordance with the communication available time, during which ownvehicle 600 and nearby vehicle 601 can communicate, and which is basedon the speed difference between these vehicles. For example, when thespeed difference is large and the communication available time is short,nearby vehicle 601 may extract three-dimensional points having a largeamount of features from the SWLD to decrease the density (data amount)of the point cloud.

The detection of the surrounding conditions refers to judging thepresence/absence of persons, vehicles, equipment for roadworks, etc.,identifying their types, and detecting their positions, travellingdirections, traveling speeds, etc.

Own vehicle 600 may obtain braking information of nearby vehicle 601instead of or in addition to three-dimensional data 607 generated bynearby vehicle 601. Here, the braking information of nearby vehicle 601is, for example, information indicating that the accelerator or thebrake of nearby vehicle 601 has been pressed, or the degree of suchpressing.

In the point clouds generated by the vehicles, the three-dimensionalspaces are segmented on a random access unit, in consideration oflow-latency communication between the vehicles. Meanwhile, in athree-dimensional map, etc., which is map data downloaded from theserver, a three-dimensional space is segmented in a larger random accessunit than in the case of inter-vehicle communication.

Data on a region that is likely to be an occlusion region, such as aregion in front of the preceding vehicle and a region behind thefollowing vehicle, is segmented on a finer random access unit aslow-latency data.

Data on a region in front of a vehicle has an increased importance whenon an expressway, and thus each vehicle creates a SWLD of a range with anarrowed viewing angle on a finer random access unit when running on anexpressway.

When the SWLD created by the preceding vehicle for transmission includesa region, the point cloud of which own vehicle 600 can obtain, thepreceding vehicle may remove the point cloud of such region to reducethe amount of data to transmit.

Embodiment 3

The present embodiment describes a method, etc. of transmittingthree-dimensional data to a following vehicle. FIG. 9 is a diagramshowing an exemplary space, three-dimensional data of which is to betransmitted to a following vehicle, etc.

Vehicle 801 transmits, at the time interval of Δt, three-dimensionaldata, such as a point cloud (a point group) included in a rectangularsolid space 802, having width W, height H, and depth D, located ahead ofvehicle 801 and distanced by distance L from vehicle 801, to acloud-based traffic monitoring system that monitors road situations or afollowing vehicle.

When a change has occurred in the three-dimensional data of a space thatis included in space 802 already transmitted in the past, due to avehicle or a person entering space 802 from outside, for example,vehicle 801 also transmits three-dimensional data of the space in whichsuch change has occurred.

Although FIG. 9 illustrates an example in which space 802 has arectangular solid shape, space 802 is not necessarily a rectangularsolid so long as space 802 includes a space on the forward road that ishidden from view of a following vehicle.

Distance L may be set to a distance that allows the following vehiclehaving received the three-dimensional data to stop safely. For example,set as distance L is the sum of; a distance traveled by the followingvehicle while receiving the three-dimensional data; a distance traveledby the following vehicle until the following vehicle starts speedreduction in accordance with the received data; and a distance requiredby the following vehicle to stop safely after starting speed reduction.These distances vary in accordance with the speed, and thus distance Lmay vary in accordance with speed V of the vehicle, just like L=a×V+b (aand b are constants).

Width W is set to a value that is at least greater than the width of thelane on which vehicle 801 is traveling. Width W may also be set to asize that includes an adjacent space such as right and left lanes and aside strip.

Depth D may have a fixed value, but may vary in accordance with speed Vof the vehicle, just like D=c×V+d (c and d are constants). Also, D thatis set to satisfy D>V×Δt enables the overlap of a space to betransmitted and a space transmitted in the past. This enables vehicle801 to transmit a space on the traveling road to the following vehicle,etc. completely and more reliably.

As described above, vehicle 801 transmits three-dimensional data of alimited space that is useful to the following vehicle, therebyeffectively reducing the amount of the three-dimensional data to betransmitted and achieving low-latency, low-cost communication.

Embodiment 4

In Embodiment 3, an example is described in which a client device of avehicle or the like transmits three-dimensional data to another vehicleor a server such as a cloud-based traffic monitoring system. In thepresent embodiment, a client device transmits sensor informationobtained through a sensor to a server or a client device.

A structure of a system according to the present embodiment will firstbe described. FIG. 10 is a diagram showing the structure of atransmission/reception system of a three-dimensional map and sensorinformation according to the present embodiment. This system includesserver 901, and client devices 902A and 902B. Note that client devices902A and 902B are also referred to as client device 902 when noparticular distinction is made therebetween.

Client device 902 is, for example, a vehicle-mounted device equipped ina mobile object such as a vehicle. Server 901 is, for example, acloud-based traffic monitoring system, and is capable of communicatingwith the plurality of client devices 902.

Server 901 transmits the three-dimensional map formed by a point cloudto client device 902. Note that a structure of the three-dimensional mapis not limited to a point cloud, and may also be another structureexpressing three-dimensional data such as a mesh structure.

Client device 902 transmits the sensor information obtained by clientdevice 902 to server 901. The sensor information includes, for example,at least one of information obtained by LIDAR, a visible light image, aninfrared image, a depth image, sensor position information, or sensorspeed information.

The data to be transmitted and received between server 901 and clientdevice 902 may be compressed in order to reduce data volume, and mayalso be transmitted uncompressed in order to maintain data precision.When compressing the data, it is possible to use a three-dimensionalcompression method on the point cloud based on, for example, an octreestructure. It is possible to use a two-dimensional image compressionmethod on the visible light image, the infrared image, and the depthimage. The two-dimensional image compression method is, for example,MPEG-4 AVC or HEVC standardized by MPEG.

Server 901 transmits the three-dimensional map managed by server 901 toclient device 902 in response to a transmission request for thethree-dimensional map from client device 902. Note that server 901 mayalso transmit the three-dimensional map without waiting for thetransmission request for the three-dimensional map from client device902. For example, server 901 may broadcast the three-dimensional map toat least one client device 902 located in a predetermined space. Server901 may also transmit the three-dimensional map suited to a position ofclient device 902 at fixed time intervals to client device 902 that hasreceived the transmission request once. Server 901 may also transmit thethree-dimensional map managed by server 901 to client device 902 everytime the three-dimensional map is updated.

Client device 902 sends the transmission request for thethree-dimensional map to server 901. For example, when client device 902wants to perform the self-location estimation during traveling, clientdevice 902 transmits the transmission request for the three-dimensionalmap to server 901.

Note that in the following cases, client device 902 may send thetransmission request for the three-dimensional map to server 901. Clientdevice 902 may send the transmission request for the three-dimensionalmap to server 901 when the three-dimensional map stored by client device902 is old. For example, client device 902 may send the transmissionrequest for the three-dimensional map to server 901 when a fixed periodhas passed since the three-dimensional map is obtained by client device902.

Client device 902 may also send the transmission request for thethree-dimensional map to server 901 before a fixed time when clientdevice 902 exits a space shown in the three-dimensional map stored byclient device 902. For example, client device 902 may send thetransmission request for the three-dimensional map to server 901 whenclient device 902 is located within a predetermined distance from aboundary of the space shown in the three-dimensional map stored byclient device 902. When a movement path and a movement speed of clientdevice 902 are understood, a time when client device 902 exits the spaceshown in the three-dimensional map stored by client device 902 may bepredicted based on the movement path and the movement speed of clientdevice 902.

Client device 902 may also send the transmission request for thethree-dimensional map to server 901 when an error during alignment ofthe three-dimensional data and the three-dimensional map created fromthe sensor information by client device 902 is at least at a fixedlevel.

Client device 902 transmits the sensor information to server 901 inresponse to a transmission request for the sensor information fromserver 901. Note that client device 902 may transmit the sensorinformation to server 901 without waiting for the transmission requestfor the sensor information from server 901. For example, client device902 may periodically transmit the sensor information during a fixedperiod when client device 902 has received the transmission request forthe sensor information from server 901 once. Client device 902 maydetermine that there is a possibility of a change in thethree-dimensional map of a surrounding area of client device 902 havingoccurred, and transmit this information and the sensor information toserver 901, when the error during alignment of the three-dimensionaldata created by client device 902 based on the sensor information andthe three-dimensional map obtained from server 901 is at least at thefixed level.

Server 901 sends a transmission request for the sensor information toclient device 902. For example, server 901 receives positioninformation, such as GPS information, about client device 902 fromclient device 902. Server 901 sends the transmission request for thesensor information to client device 902 in order to generate a newthree-dimensional map, when it is determined that client device 902 isapproaching a space in which the three-dimensional map managed by server901 contains little information, based on the position information aboutclient device 902. Server 901 may also send the transmission request forthe sensor information, when wanting to (i) update the three-dimensionalmap, (ii) check road conditions during snowfall, a disaster, or thelike, or (iii) check traffic congestion conditions, accident/incidentconditions, or the like.

Client device 902 may set an amount of data of the sensor information tobe transmitted to server 901 in accordance with communication conditionsor bandwidth during reception of the transmission request for the sensorinformation to be received from server 901. Setting the amount of dataof the sensor information to be transmitted to server 901 is, forexample, increasing/reducing the data itself or appropriately selectinga compression method.

FIG. 11 is a block diagram showing an example structure of client device902. Client device 902 receives the three-dimensional map formed by apoint cloud and the like from server 901, and estimates a self-locationof client device 902 using the three-dimensional map created based onthe sensor information of client device 902. Client device 902 transmitsthe obtained sensor information to server 901.

Client device 902 includes data receiver 1011, communication unit 1012,reception controller 1013, format converter 1014, sensors 1015,three-dimensional data creator 1016, three-dimensional image processor1017, three-dimensional data storage 1018, format converter 1019,communication unit 1020, transmission controller 1021, and datatransmitter 1022.

Data receiver 1011 receives three-dimensional map 1031 from server 901.Three-dimensional map 1031 is data that includes a point cloud such as aWLD or a SWLD. Three-dimensional map 1031 may include compressed data oruncompressed data.

Communication unit 1012 communicates with server 901 and transmits adata transmission request (e.g. transmission request forthree-dimensional map) to server 901.

Reception controller 1013 exchanges information, such as information onsupported formats, with a communications partner via communication unit1012 to establish communication with the communications partner.

Format converter 1014 performs a format conversion and the like onthree-dimensional map 1031 received by data receiver 1011 to generatethree-dimensional map 1032. Format converter 1014 also performs adecompression or decoding process when three-dimensional map 1031 iscompressed or encoded. Note that format converter 1014 does not performthe decompression or decoding process when three-dimensional map 1031 isuncompressed data.

Sensors 815 are a group of sensors, such as LIDARs, visible lightcameras, infrared cameras, or depth sensors that obtain informationabout the outside of a vehicle equipped with client device 902, andgenerate sensor information 1033. Sensor information 1033 is, forexample, three-dimensional data such as a point cloud (point group data)when sensors 1015 are laser sensors such as LIDARs. Note that a singlesensor may serve as sensors 1015.

Three-dimensional data creator 1016 generates three-dimensional data1034 of a surrounding area of the own vehicle based on sensorinformation 1033. For example, three-dimensional data creator 1016generates point cloud data with color information on the surroundingarea of the own vehicle using information obtained by LIDAR and visiblelight video obtained by a visible light camera.

Three-dimensional image processor 1017 performs a self-locationestimation process and the like of the own vehicle, using (i) thereceived three-dimensional map 1032 such as a point cloud, and (ii)three-dimensional data 1034 of the surrounding area of the own vehiclegenerated using sensor information 1033. Note that three-dimensionalimage processor 1017 may generate three-dimensional data 1035 about thesurroundings of the own vehicle by merging three-dimensional map 1032and three-dimensional data 1034, and may perform the self-locationestimation process using the created three-dimensional data 1035.

Three-dimensional data storage 1018 stores three-dimensional map 1032,three-dimensional data 1034, three-dimensional data 1035, and the like.

Format converter 1019 generates sensor information 1037 by convertingsensor information 1033 to a format supported by a receiver end. Notethat format converter 1019 may reduce the amount of data by compressingor encoding sensor information 1037. Format converter 1019 may omit thisprocess when format conversion is not necessary. Format converter 1019may also control the amount of data to be transmitted in accordance witha specified transmission range.

Communication unit 1020 communicates with server 901 and receives a datatransmission request (transmission request for sensor information) andthe like from server 901.

Transmission controller 1021 exchanges information, such as informationon supported formats, with a communications partner via communicationunit 1020 to establish communication with the communications partner.

Data transmitter 1022 transmits sensor information 1037 to server 901.Sensor information 1037 includes, for example, information obtainedthrough sensors 1015, such as information obtained by LIDAR, a luminanceimage obtained by a visible light camera, an infrared image obtained byan infrared camera, a depth image obtained by a depth sensor, sensorposition information, and sensor speed information.

A structure of server 901 will be described next. FIG. 12 is a blockdiagram showing an example structure of server 901. Server 901 transmitssensor information from client device 902 and creates three-dimensionaldata based on the received sensor information. Server 901 updates thethree-dimensional map managed by server 901 using the createdthree-dimensional data. Server 901 transmits the updatedthree-dimensional map to client device 902 in response to a transmissionrequest for the three-dimensional map from client device 902.

Server 901 includes data receiver 1111, communication unit 1112,reception controller 1113, format converter 1114, three-dimensional datacreator 1116, three-dimensional data merger 1117, three-dimensional datastorage 1118, format converter 1119, communication unit 1120,transmission controller 1121, and data transmitter 1122.

Data receiver 1111 receives sensor information 1037 from client device902. Sensor information 1037 includes, for example, information obtainedby LIDAR, a luminance image obtained by a visible light camera, aninfrared image obtained by an infrared camera, a depth image obtained bya depth sensor, sensor position information, sensor speed information,and the like.

Communication unit 1112 communicates with client device 902 andtransmits a data transmission request (e.g. transmission request forsensor information) and the like to client device 902.

Reception controller 1113 exchanges information, such as information onsupported formats, with a communications partner via communication unit1112 to establish communication with the communications partner.

Format converter 1114 generates sensor information 1132 by performing adecompression or decoding process when the received sensor information1037 is compressed or encoded. Note that format converter 1114 does notperform the decompression or decoding process when sensor information1037 is uncompressed data.

Three-dimensional data creator 1116 generates three-dimensional data1134 of a surrounding area of client device 902 based on sensorinformation 1132. For example, three-dimensional data creator 1116generates point cloud data with color information on the surroundingarea of client device 902 using information obtained by LIDAR andvisible light video obtained by a visible light camera.

Three-dimensional data merger 1117 updates three-dimensional map 1135 bymerging three-dimensional data 1134 created based on sensor information1132 with three-dimensional map 1135 managed by server 901.Three-dimensional data storage 1118 stores three-dimensional map 1135and the like.

Format converter 1119 generates three-dimensional map 1031 by convertingthree-dimensional map 1135 to a format supported by the receiver end.Note that format converter 1119 may reduce the amount of data bycompressing or encoding three-dimensional map 1135. Format converter1119 may omit this process when format conversion is not necessary.Format converter 1119 may also control the amount of data to betransmitted in accordance with a specified transmission range.

Communication unit 1120 communicates with client device 902 and receivesa data transmission request (transmission request for three-dimensionalmap) and the like from client device 902.

Transmission controller 1121 exchanges information, such as informationon supported formats, with a communications partner via communicationunit 1120 to establish communication with the communications partner.

Data transmitter 1122 transmits three-dimensional map 1031 to clientdevice 902. Three-dimensional map 1031 is data that includes a pointcloud such as a WLD or a SWLD. Three-dimensional map 1031 may includeone of compressed data and uncompressed data.

An operational flow of client device 902 will be described next. FIG. 13is a flowchart of an operation when client device 902 obtains thethree-dimensional map.

Client device 902 first requests server 901 to transmit thethree-dimensional map (point cloud, etc.) (S1001). At this point, byalso transmitting the position information about client device 902obtained through GPS and the like, client device 902 may also requestserver 901 to transmit a three-dimensional map relating to this positioninformation.

Client device 902 next receives the three-dimensional map from server901 (S1002). When the received three-dimensional map is compressed data,client device 902 decodes the received three-dimensional map andgenerates an uncompressed three-dimensional map (S1003).

Client device 902 next creates three-dimensional data 1034 of thesurrounding area of client device 902 using sensor information 1033obtained by sensors 1015 (S1004). Client device 902 next estimates theself-location of client device 902 using three-dimensional map 1032received from server 901 and three-dimensional data 1034 created usingsensor information 1033 (S1005).

FIG. 14 is a flowchart of an operation when client device 902 transmitsthe sensor information. Client device 902 first receives a transmissionrequest for the sensor information from server 901 (S1011). Clientdevice 902 that has received the transmission request transmits sensorinformation 1037 to server 901 (S1012). Note that client device 902 maygenerate sensor information 1037 by compressing each piece ofinformation using a compression method suited to each piece ofinformation, when sensor information 1033 includes a plurality of piecesof information obtained by sensors 1015.

An operational flow of server 901 will be described next. FIG. 15 is aflowchart of an operation when server 901 obtains the sensorinformation. Server 901 first requests client device 902 to transmit thesensor information (S1021). Server 901 next receives sensor information1037 transmitted from client device 902 in accordance with the request(S1022). Server 901 next creates three-dimensional data 1134 using thereceived sensor information 1037 (S1023). Server 901 next reflects thecreated three-dimensional data 1134 in three-dimensional map 1135(S1024).

FIG. 16 is a flowchart of an operation when server 901 transmits thethree-dimensional map. Server 901 first receives a transmission requestfor the three-dimensional map from client device 902 (S1031). Server 901that has received the transmission request for the three-dimensional maptransmits the three-dimensional map to client device 902 (S1032). Atthis point, server 901 may extract a three-dimensional map of a vicinityof client device 902 along with the position information about clientdevice 902, and transmit the extracted three-dimensional map. Server 901may compress the three-dimensional map formed by a point cloud using,for example, an octree structure compression method, and transmit thecompressed three-dimensional map.

The following describes variations of the present embodiment.

Server 901 creates three-dimensional data 1134 of a vicinity of aposition of client device 902 using sensor information 1037 receivedfrom client device 902. Server 901 next calculates a difference betweenthree-dimensional data 1134 and three-dimensional map 1135, by matchingthe created three-dimensional data 1134 with three-dimensional map 1135of the same area managed by server 901. Server 901 determines that atype of anomaly has occurred in the surrounding area of client device902, when the difference is greater than or equal to a predeterminedthreshold. For example, it is conceivable that a large difference occursbetween three-dimensional map 1135 managed by server 901 andthree-dimensional data 1134 created based on sensor information 1037,when land subsidence and the like occurs due to a natural disaster suchas an earthquake.

Sensor information 1037 may include information indicating at least oneof a sensor type, a sensor performance, and a sensor model number.Sensor information 1037 may also be appended with a class ID and thelike in accordance with the sensor performance. For example, when sensorinformation 1037 is obtained by LIDAR, it is conceivable to assignidentifiers to the sensor performance. A sensor capable of obtaininginformation with precision in units of several millimeters is class 1, asensor capable of obtaining information with precision in units ofseveral centimeters is class 2, and a sensor capable of obtaininginformation with precision in units of several meters is class 3. Server901 may estimate sensor performance information and the like from amodel number of client device 902. For example, when client device 902is equipped in a vehicle, server 901 may determine sensor specificationinformation from a type of the vehicle. In this case, server 901 mayobtain information on the type of the vehicle in advance, and theinformation may also be included in the sensor information. Server 901may change a degree of correction with respect to three-dimensional data1134 created using sensor information 1037, using the obtained sensorinformation 1037. For example, when the sensor performance is high inprecision (class 1), server 901 does not correct three-dimensional data1134. When the sensor performance is low in precision (class 3), server901 corrects three-dimensional data 1134 in accordance with theprecision of the sensor. For example, server 901 increases the degree(intensity) of correction with a decrease in the precision of thesensor.

Server 901 may simultaneously send the transmission request for thesensor information to the plurality of client devices 902 in a certainspace. Server 901 does not need to use all of the sensor information forcreating three-dimensional data 1134 and may, for example, select sensorinformation to be used in accordance with the sensor performance, whenhaving received a plurality of pieces of sensor information from theplurality of client devices 902. For example, when updatingthree-dimensional map 1135, server 901 may select high-precision sensorinformation (class 1) from among the received plurality of pieces ofsensor information, and create three-dimensional data 1134 using theselected sensor information.

Server 901 is not limited to only being a server such as a cloud-basedtraffic monitoring system, and may also be another (vehicle-mounted)client device. FIG. 17 is a diagram of a system structure in this case.

For example, client device 902C sends a transmission request for sensorinformation to client device 902A located nearby, and obtains the sensorinformation from client device 902A. Client device 902C then createsthree-dimensional data using the obtained sensor information of clientdevice 902A, and updates a three-dimensional map of client device 902C.This enables client device 902C to generate a three-dimensional map of aspace that can be obtained from client device 902A, and fully utilizethe performance of client device 902C. For example, such a case isconceivable when client device 902C has high performance.

In this case, client device 902A that has provided the sensorinformation is given rights to obtain the high-precisionthree-dimensional map generated by client device 902C. Client device902A receives the high-precision three-dimensional map from clientdevice 902C in accordance with these rights.

Server 901 may send the transmission request for the sensor informationto the plurality of client devices 902 (client device 902A and clientdevice 902B) located nearby client device 902C. When a sensor of clientdevice 902A or client device 902B has high performance, client device902C is capable of creating the three-dimensional data using the sensorinformation obtained by this high-performance sensor.

FIG. 18 is a block diagram showing a functionality structure of server901 and client device 902. Server 901 includes, for example,three-dimensional map compression/decoding processor 1201 thatcompresses and decodes the three-dimensional map and sensor informationcompression/decoding processor 1202 that compresses and decodes thesensor information.

Client device 902 includes three-dimensional map decoding processor 1211and sensor information compression processor 1212. Three-dimensional mapdecoding processor 1211 receives encoded data of the compressedthree-dimensional map, decodes the encoded data, and obtains thethree-dimensional map. Sensor information compression processor 1212compresses the sensor information itself instead of thethree-dimensional data created using the obtained sensor information,and transmits the encoded data of the compressed sensor information toserver 901. With this structure, client device 902 does not need tointernally store a processor that performs a process for compressing thethree-dimensional data of the three-dimensional map (point cloud, etc.),as long as client device 902 internally stores a processor that performsa process for decoding the three-dimensional map (point cloud, etc.).This makes it possible to limit costs, power consumption, and the likeof client device 902.

As stated above, client device 902 according to the present embodimentis equipped in the mobile object, and creates three-dimensional data1034 of a surrounding area of the mobile object using sensor information1033 that is obtained through sensor 1015 equipped in the mobile objectand indicates a surrounding condition of the mobile object. Clientdevice 902 estimates a self-location of the mobile object using thecreated three-dimensional data 1034. Client device 902 transmits theobtained sensor information 1033 to server 901 or another mobile object.

This enables client device 902 to transmit sensor information 1033 toserver 901 or the like. This makes it possible to further reduce theamount of transmission data compared to when transmitting thethree-dimensional data. Since there is no need for client device 902 toperform processes such as compressing or encoding the three-dimensionaldata, it is possible to reduce the processing amount of client device902. As such, client device 902 is capable of reducing the amount ofdata to be transmitted or simplifying the structure of the device.

Client device 902 further transmits the transmission request for thethree-dimensional map to server 901 and receives three-dimensional map1031 from server 901. In the estimating of the self-location, clientdevice 902 estimates the self-location using three-dimensional data 1034and three-dimensional map 1032.

Sensor information 1034 includes at least one of information obtained bya laser sensor, a luminance image, an infrared image, a depth image,sensor position information, or sensor speed information.

Sensor information 1033 includes information that indicates aperformance of the sensor.

Client device 902 encodes or compresses sensor information 1033, and inthe transmitting of the sensor information, transmits sensor information1037 that has been encoded or compressed to server 901 or another mobileobject 902. This enables client device 902 to reduce the amount of datato be transmitted.

For example, client device 902 includes a processor and memory. Theprocessor performs the above processes using the memory.

Server 901 according to the present embodiment is capable ofcommunicating with client device 902 equipped in the mobile object, andreceives sensor information 1037 that is obtained through sensor 1015equipped in the mobile object and indicates a surrounding condition ofthe mobile object. Server 901 creates three-dimensional data 1134 of asurrounding area of the mobile object using the received sensorinformation 1037.

With this, server 901 creates three-dimensional data 1134 using sensorinformation 1037 transmitted from client device 902. This makes itpossible to further reduce the amount of transmission data compared towhen client device 902 transmits the three-dimensional data. Since thereis no need for client device 902 to perform processes such ascompressing or encoding the three-dimensional data, it is possible toreduce the processing amount of client device 902. As such, server 901is capable of reducing the amount of data to be transmitted orsimplifying the structure of the device.

Server 901 further transmits a transmission request for the sensorinformation to client device 902.

Server 901 further updates three-dimensional map 1135 using the createdthree-dimensional data 1134, and transmits three-dimensional map 1135 toclient device 902 in response to the transmission request forthree-dimensional map 1135 from client device 902.

Sensor information 1037 includes at least one of information obtained bya laser sensor, a luminance image, an infrared image, a depth image,sensor position information, or sensor speed information.

Sensor information 1037 includes information that indicates aperformance of the sensor.

Server 901 further corrects the three-dimensional data in accordancewith the performance of the sensor. This enables the three-dimensionaldata creation method to improve the quality of the three-dimensionaldata.

In the receiving of the sensor information, server 901 receives aplurality of pieces of sensor information 1037 received from a pluralityof client devices 902, and selects sensor information 1037 to be used inthe creating of three-dimensional data 1134, based on a plurality ofpieces of information that each indicates the performance of the sensorincluded in the plurality of pieces of sensor information 1037. Thisenables server 901 to improve the quality of three-dimensional data1134.

Server 901 decodes or decompresses the received sensor information 1037,and creates three-dimensional data 1134 using sensor information 1132that has been decoded or decompressed. This enables server 901 to reducethe amount of data to be transmitted.

For example, server 901 includes a processor and memory. The processorperforms the above processes using the memory.

Embodiment 5

In the present embodiment, a variation of Embodiment 4 will bedescribed. FIG. 19 is a diagram illustrating a configuration of a systemaccording to the present embodiment. The system illustrated in FIG. 19includes server 2001, client device 2002A, and client device 2002B.

Client device 2002A and client device 2002B are each provided in amobile object such as a vehicle, and transmit sensor information toserver 2001. Server 2001 transmits a three-dimensional map (a pointcloud) to client device 2002A and client device 2002B.

Client device 2002A includes sensor information obtainer 2011, storage2012, and data transmission possibility determiner 2013. It should benoted that client device 2002B has the same configuration. Additionally,when client device 2002A and client device 2002B are not particularlydistinguished below, client device 2002A and client device 2002B arealso referred to as client device 2002.

FIG. 20 is a flowchart illustrating operation of client device 2002according to the present embodiment.

Sensor information obtainer 2011 obtains a variety of sensor informationusing sensors (a group of sensors) provided in a mobile object. In otherwords, sensor information obtainer 2011 obtains sensor informationobtained by the sensors (the group of sensors) provided in the mobileobject and indicating a surrounding state of the mobile object. Sensorinformation obtainer 2011 also stores the obtained sensor informationinto storage 2012. This sensor information includes at least one ofinformation obtained by LiDAR, a visible light image, an infrared image,or a depth image. Additionally, the sensor information may include atleast one of sensor position information, speed information, obtainmenttime information, or obtainment location information. Sensor positioninformation indicates a position of a sensor that has obtained sensorinformation. Speed information indicates a speed of the mobile objectwhen a sensor obtained sensor information. Obtainment time informationindicates a time when a sensor obtained sensor information. Obtainmentlocation information indicates a position of the mobile object or asensor when the sensor obtained sensor information.

Next, data transmission possibility determiner 2013 determines whetherthe mobile object (client device 2002) is in an environment in which themobile object can transmit sensor information to server 2001 (S2002).For example, data transmission possibility determiner 2013 may specify alocation and a time at which client device 2002 is present using GPSinformation etc., and may determine whether data can be transmitted.Additionally, data transmission possibility determiner 2013 maydetermine whether data can be transmitted, depending on whether it ispossible to connect to a specific access point.

When client device 2002 determines that the mobile object is in theenvironment in which the mobile object can transmit the sensorinformation to server 2001 (YES in S2002), client device 2002 transmitsthe sensor information to server 2001 (S2003). In other words, whenclient device 2002 becomes capable of transmitting sensor information toserver 2001, client device 2002 transmits the sensor information held byclient device 2002 to server 2001. For example, an access point thatenables high-speed communication using millimeter waves is provided inan intersection or the like. When client device 2002 enters theintersection, client device 2002 transmits the sensor information heldby client device 2002 to server 2001 at high speed using themillimeter-wave communication.

Next, client device 2002 deletes from storage 2012 the sensorinformation that has been transmitted to server 2001 (S2004). It shouldbe noted that when sensor information that has not been transmitted toserver 2001 meets predetermined conditions, client device 2002 maydelete the sensor information. For example, when an obtainment time ofsensor information held by client device 2002 precedes a current time bya certain time, client device 2002 may delete the sensor informationfrom storage 2012. In other words, when a difference between the currenttime and a time when a sensor obtained sensor information exceeds apredetermined time, client device 2002 may delete the sensor informationfrom storage 2012. Besides, when an obtainment location of sensorinformation held by client device 2002 is separated from a currentlocation by a certain distance, client device 2002 may delete the sensorinformation from storage 2012. In other words, when a difference betweena current position of the mobile object or a sensor and a position ofthe mobile object or the sensor when the sensor obtained sensorinformation exceeds a predetermined distance, client device 2002 maydelete the sensor information from storage 2012. Accordingly, it ispossible to reduce the capacity of storage 2012 of client device 2002.

When client device 2002 does not finish obtaining sensor information (NOin S2005), client device 2002 performs step S2001 and the subsequentsteps again. Further, when client device 2002 finishes obtaining sensorinformation (YES in S2005), client device 2002 completes the process.

Client device 2002 may select sensor information to be transmitted toserver 2001, in accordance with communication conditions. For example,when high-speed communication is available, client device 2002preferentially transmits sensor information (e.g., information obtainedby LiDAR) of which the data size held in storage 2012 is large.Additionally, when high-speed communication is not readily available,client device 2002 transmits sensor information (e.g., a visible lightimage) which has high priority and of which the data size held instorage 2012 is small. Accordingly, client device 2002 can efficientlytransmit sensor information held in storage 2012, in accordance withnetwork conditions

Client device 2002 may obtain, from server 2001, time informationindicating a current time and location information indicating a currentlocation. Moreover, client device 2002 may determine an obtainment timeand an obtainment location of sensor information based on the obtainedtime information and location information. In other words, client device2002 may obtain time information from server 2001 and generateobtainment time information using the obtained time information. Clientdevice 2002 may also obtain location information from server 2001 andgenerate obtainment location information using the obtained locationinformation.

For example, regarding time information, server 2001 and client device2002 perform clock synchronization using a means such as the NetworkTime Protocol (NTP) or the Precision Time Protocol (PTP). This enablesclient device 2002 to obtain accurate time information. What's more,since it is possible to synchronize clocks between server 2001 andclient devices 2002, it is possible to synchronize times included inpieces of sensor information obtained by separate client devices 2002.As a result, server 2001 can handle sensor information indicating asynchronized time. It should be noted that a means of synchronizingclocks may be any means other than the NTP or PTP. In addition, GPSinformation may be used as the time information and the locationinformation.

Server 2001 may specify a time or a location and obtain pieces of sensorinformation from client devices 2002. For example, when an accidentoccurs, in order to search for a client device in the vicinity of theaccident, server 2001 specifies an accident occurrence time and anaccident occurrence location and broadcasts sensor informationtransmission requests to client devices 2002. Then, client device 2002having sensor information obtained at the corresponding time andlocation transmits the sensor information to server 2001. In otherwords, client device 2002 receives, from server 2001, a sensorinformation transmission request including specification informationspecifying a location and a time. When sensor information obtained at alocation and a time indicated by the specification information is storedin storage 2012, and client device 2002 determines that the mobileobject is present in the environment in which the mobile object cantransmit the sensor information to server 2001, client device 2002transmits, to server 2001, the sensor information obtained at thelocation and the time indicated by the specification information.Consequently, server 2001 can obtain the pieces of sensor informationpertaining to the occurrence of the accident from client devices 2002,and use the pieces of sensor information for accident analysis etc.

It should be noted that when client device 2002 receives a sensorinformation transmission request from server 2001, client device 2002may refuse to transmit sensor information. Additionally, client device2002 may set in advance which pieces of sensor information can betransmitted. Alternatively, server 2001 may inquire of client device2002 each time whether sensor information can be transmitted.

A point may be given to client device 2002 that has transmitted sensorinformation to server 2001. This point can be used in payment for, forexample, gasoline expenses, electric vehicle (EV) charging expenses, ahighway toll, or rental car expenses. After obtaining sensorinformation, server 2001 may delete information for specifying clientdevice 2002 that has transmitted the sensor information. For example,this information is a network address of client device 2002. Since thisenables the anonymization of sensor information, a user of client device2002 can securely transmit sensor information from client device 2002 toserver 2001. Server 2001 may include servers. For example, by serverssharing sensor information, even when one of the servers breaks down,the other servers can communicate with client device 2002. Accordingly,it is possible to avoid service outage due to a server breakdown.

A specified location specified by a sensor information transmissionrequest indicates an accident occurrence location etc., and may bedifferent from a position of client device 2002 at a specified timespecified by the sensor information transmission request. For thisreason, for example, by specifying, as a specified location, a rangesuch as within XX meters of a surrounding area, server 2001 can requestinformation from client device 2002 within the range. Similarly, server2001 may also specify, as a specified time, a range such as within Nseconds before and after a certain time. As a result, server 2001 canobtain sensor information from client device 2002 present for a timefrom t-N to t+N and in a location within XX meters from absoluteposition S. When client device 2002 transmits three-dimensional datasuch as LiDAR, client device 2002 may transmit data created immediatelyafter time t.

Server 2001 may separately specify information indicating, as aspecified location, a location of client device 2002 from which sensorinformation is to be obtained, and a location at which sensorinformation is desirably obtained. For example, server 2001 specifiesthat sensor information including at least a range within YY meters fromabsolute position S is to be obtained from client device 2002 presentwithin XX meters from absolute position S. When client device 2002selects three-dimensional data to be transmitted, client device 2002selects one or more pieces of three-dimensional data so that the one ormore pieces of three-dimensional data include at least the sensorinformation including the specified range. Each of the one or morepieces of three-dimensional data is a random-accessible unit of data. Inaddition, when client device 2002 transmits a visible light image,client device 2002 may transmit pieces of temporally continuous imagedata including at least a frame immediately before or immediately aftertime t.

When client device 2002 can use physical networks such as 5G, Wi-Fi, ormodes in 5G for transmitting sensor information, client device 2002 mayselect a network to be used according to the order of priority notifiedby server 2001. Alternatively, client device 2002 may select a networkthat enables client device 2002 to ensure an appropriate bandwidth basedon the size of transmit data. Alternatively, client device 2002 mayselect a network to be used, based on data transmission expenses etc. Atransmission request from server 2001 may include information indicatinga transmission deadline, for example, performing transmission whenclient device 2002 can start transmission by time t. When server 2001cannot obtain sufficient sensor information within a time limit, server2001 may issue a transmission request again.

Sensor information may include header information indicatingcharacteristics of sensor data along with compressed or uncompressedsensor data. Client device 2002 may transmit header information toserver 2001 via a physical network or a communication protocol that isdifferent from a physical network or a communication protocol used forsensor data. For example, client device 2002 transmits headerinformation to server 2001 prior to transmitting sensor data. Server2001 determines whether to obtain the sensor data of client device 2002,based on a result of analysis of the header information. For example,header information may include information indicating a point cloudobtainment density, an elevation angle, or a frame rate of LiDAR, orinformation indicating, for example, a resolution, an SN ratio, or aframe rate of a visible light image. Accordingly, server 2001 can obtainthe sensor information from client device 2002 having the sensor data ofdetermined quality.

As stated above, client device 2002 is provided in the mobile object,obtains sensor information that has been obtained by a sensor providedin the mobile object and indicates a surrounding state of the mobileobject, and stores the sensor information into storage 2012. Clientdevice 2002 determines whether the mobile object is present in anenvironment in which the mobile object is capable of transmitting thesensor information to server 2001, and transmits the sensor informationto server 2001 when the mobile object is determined to be present in theenvironment in which the mobile object is capable of transmitting thesensor information to server 2001.

Additionally, client device 2002 further creates, from the sensorinformation, three-dimensional data of a surrounding area of the mobileobject, and estimates a self-location of the mobile object using thethree-dimensional data created.

Besides, client device 2002 further transmits a transmission request fora three-dimensional map to server 2001, and receives thethree-dimensional map from server 2001. In the estimating, client device2002 estimates the self-location using the three-dimensional data andthe three-dimensional map.

It should be noted that the above process performed by client device2002 may be realized as an information transmission method for use inclient device 2002.

In addition, client device 2002 may include a processor and memory.Using the memory, the processor may perform the above process.

Next, a sensor information collection system according to the presentembodiment will be described. FIG. 21 is a diagram illustrating aconfiguration of the sensor information collection system according tothe present embodiment. As illustrated in FIG. 21 , the sensorinformation collection system according to the present embodimentincludes terminal 2021A, terminal 2021B, communication device 2022A,communication device 2022B, network 2023, data collection server 2024,map server 2025, and client device 2026. It should be noted that whenterminal 2021A and terminal 2021B are not particularly distinguished,terminal 2021A and terminal 2021B are also referred to as terminal 2021.Additionally, when communication device 2022A and communication device2022B are not particularly distinguished, communication device 2022A andcommunication device 2022B are also referred to as communication device2022.

Data collection server 2024 collects data such as sensor data obtainedby a sensor included in terminal 2021 as position-related data in whichthe data is associated with a position in a three-dimensional space.

Sensor data is data obtained by, for example, detecting a surroundingstate of terminal 2021 or an internal state of terminal 2021 using asensor included in terminal 2021. Terminal 2021 transmits, to datacollection server 2024, one or more pieces of sensor data collected fromone or more sensor devices in locations at which direct communicationwith terminal 2021 is possible or at which communication with terminal2021 is possible by the same communication system or via one or morerelay devices.

Data included in position-related data may include, for example,information indicating an operating state, an operating log, a serviceuse state, etc. of a terminal or a device included in the terminal. Inaddition, the data include in the position-related data may include, forexample, information in which an identifier of terminal 2021 isassociated with a position or a movement path etc. of terminal 2021.

Information indicating a position included in position-related data isassociated with, for example, information indicating a position inthree-dimensional data such as three-dimensional map data. The detailsof information indicating a position will be described later.

Position-related data may include at least one of the above-describedtime information or information indicating an attribute of data includedin the position-related data or a type (e.g., a model number) of asensor that has created the data, in addition to position informationthat is information indicating a position. The position information andthe time information may be stored in a header area of theposition-related data or a header area of a frame that stores theposition-related data. Further, the position information and the timeinformation may be transmitted and/or stored as metadata associated withthe position-related data, separately from the position-related data.

Map server 2025 is connected to, for example, network 2023, andtransmits three-dimensional data such as three-dimensional map data inresponse to a request from another device such as terminal 2021.Besides, as described in the aforementioned embodiments, map server 2025may have, for example, a function of updating three-dimensional datausing sensor information transmitted from terminal 2021.

Data collection server 2024 is connected to, for example, network 2023,collects position-related data from another device such as terminal2021, and stores the collected position-related data into a storage ofdata collection server 2024 or a storage of another server. In addition,data collection server 2024 transmits, for example, metadata ofcollected position-related data or three-dimensional data generatedbased on the position-related data, to terminal 2021 in response to arequest from terminal 2021.

Network 2023 is, for example, a communication network such as theInternet. Terminal 2021 is connected to network 2023 via communicationdevice 2022. Communication device 2022 communicates with terminal 2021using one communication system or switching between communicationsystems. Communication device 2022 is a communication satellite thatperforms communication using, for example, (1) a base station compliantwith Long-Term Evolution (LTE) etc., (2) an access point (AP) for Wi-Fior millimeter-wave communication etc., (3) a low-power wide-area (LPWA)network gateway such as SIGFOX, LoRaWAN, or Wi-SUN, or (4) a satellitecommunication system such as DVB-S2.

It should be noted that a base station may communicate with terminal2021 using a system classified as an LPWA network such as NarrowbandInternet of Things (NB IoT) or LTE-M, or switching between thesesystems.

Here, although, in the example given, terminal 2021 has a function ofcommunicating with communication device 2022 that uses two types ofcommunication systems, and communicates with map server 2025 or datacollection server 2024 using one of the communication systems orswitching between the communication systems and between communicationdevices 2022 to be a direct communication partner; a configuration ofthe sensor information collection system and terminal 2021 is notlimited to this. For example, terminal 2021 need not have a function ofperforming communication using communication systems, and may have afunction of performing communication using one of the communicationsystems. Terminal 2021 may also support three or more communicationsystems. Additionally, each terminal 2021 may support a differentcommunication system.

Terminal 2021 includes, for example, the configuration of client device902 illustrated in FIG. 11 . Terminal 2021 estimates a self-locationetc. using received three-dimensional data. Besides, terminal 2021associates sensor data obtained from a sensor and position informationobtained by self-location estimation to generate position-related data.

Position information appended to position-related data indicates, forexample, a position in a coordinate system used for three-dimensionaldata. For example, the position information is coordinate valuesrepresented using a value of a latitude and a value of a longitude.Here, terminal 2021 may include, in the position information, acoordinate system serving as a reference for the coordinate values andinformation indicating three-dimensional data used for locationestimation, along with the coordinate values. Coordinate values may alsoinclude altitude information.

The position information may be associated with a data unit or a spaceunit usable for encoding the above three-dimensional data. Such a unitis, for example, WLD, GOS, SPC, VLM, or VXL. Here, the positioninformation is represented by, for example, an identifier foridentifying a data unit such as the SPC corresponding toposition-related data. It should be noted that the position informationmay include, for example, information indicating three-dimensional dataobtained by encoding a three-dimensional space including a data unitsuch as the SPC or information indicating a detailed position within theSPC, in addition to the identifier for identifying the data unit such asthe SPC. The information indicating the three-dimensional data is, forexample, a file name of the three-dimensional data.

As stated above, by generating position-related data associated withposition information based on location estimation usingthree-dimensional data, the system can give more accurate positioninformation to sensor information than when the system appends positioninformation based on a self-location of a client device (terminal 2021)obtained using a GPS to sensor information. As a result, even whenanother device uses the position-related data in another service, thereis a possibility of more accurately determining a position correspondingto the position-related data in an actual space, by performing locationestimation based on the same three-dimensional data.

It should be noted that although the data transmitted from terminal 2021is the position-related data in the example given in the presentembodiment, the data transmitted from terminal 2021 may be dataunassociated with position information. In other words, the transmissionand reception of three-dimensional data or sensor data described in theother embodiments may be performed via network 2023 described in thepresent embodiment.

Next, a different example of position information indicating a positionin a three-dimensional or two-dimensional actual space or in a map spacewill be described. The position information appended to position-relateddata may be information indicating a relative position relative to akeypoint in three-dimensional data. Here, the keypoint serving as areference for the position information is encoded as, for example, SWLD,and notified to terminal 2021 as three-dimensional data.

The information indicating the relative position relative to thekeypoint may be, for example, information that is represented by avector from the keypoint to the point indicated by the positioninformation, and indicates a direction and a distance from the keypointto the point indicated by the position information. Alternatively, theinformation indicating the relative position relative to the keypointmay be information indicating an amount of displacement from thekeypoint to the point indicated by the position information along eachof the x axis, the y axis, and the z axis. Additionally, the informationindicating the relative position relative to the keypoint may beinformation indicating a distance from each of three or more keypointsto the point indicated by the position information. It should be notedthat the relative position need not be a relative position of the pointindicated by the position information represented using each keypoint asa reference, and may be a relative position of each keypoint representedwith respect to the point indicated by the position information.Examples of position information based on a relative position relativeto a keypoint include information for identifying a keypoint to be areference, and information indicating the relative position of the pointindicated by the position information and relative to the keypoint. Whenthe information indicating the relative position relative to thekeypoint is provided separately from three-dimensional data, theinformation indicating the relative position relative to the keypointmay include, for example, coordinate axes used in deriving the relativeposition, information indicating a type of the three-dimensional data,and/or information indicating a magnitude per unit amount (e.g., ascale) of a value of the information indicating the relative position.

The position information may include, for each keypoint, informationindicating a relative position relative to the keypoint. When theposition information is represented by relative positions relative tokeypoints, terminal 2021 that intends to identify a position in anactual space indicated by the position information may calculatecandidate points of the position indicated by the position informationfrom positions of the keypoints each estimated from sensor data, and maydetermine that a point obtained by averaging the calculated candidatepoints is the point indicated by the position information. Since thisconfiguration reduces the effects of errors when the positions of thekeypoints are estimated from the sensor data, it is possible to improvethe estimation accuracy for the point in the actual space indicated bythe position information. Besides, when the position informationincludes information indicating relative positions relative tokeypoints, if it is possible to detect any one of the keypointsregardless of the presence of keypoints undetectable due to a limitationsuch as a type or performance of a sensor included in terminal 2021, itis possible to estimate a value of the point indicated by the positioninformation.

A point identifiable from sensor data can be used as a keypoint.Examples of the point identifiable from the sensor data include a pointor a point within a region that satisfies a predetermined keypointdetection condition, such as the above-described three-dimensionalfeature or feature of visible light data is greater than or equal to athreshold value.

Moreover, a marker etc. placed in an actual space may be used as akeypoint. In this case, the maker may be detected and located from dataobtained using a sensor such as LiDER or a camera. For example, themarker may be represented by a change in color or luminance value(degree of reflection), or a three-dimensional shape (e.g., unevenness).Coordinate values indicating a position of the marker, or atwo-dimensional bar code or a bar code etc. generated from an identifierof the marker may be also used.

Furthermore, a light source that transmits an optical signal may be usedas a marker. When a light source of an optical signal is used as amarker, not only information for obtaining a position such as coordinatevalues or an identifier but also other data may be transmitted using anoptical signal. For example, an optical signal may include contents ofservice corresponding to the position of the marker, an address forobtaining contents such as a URL, or an identifier of a wirelesscommunication device for receiving service, and information indicating awireless communication system etc. for connecting to the wirelesscommunication device. The use of an optical communication device (alight source) as a marker not only facilitates the transmission of dataother than information indicating a position but also makes it possibleto dynamically change the data.

Terminal 2021 finds out a correspondence relationship of keypointsbetween mutually different data using, for example, a common identifierused for the data, or information or a table indicating thecorrespondence relationship of the keypoints between the data. Whenthere is no information indicating a correspondence relationship betweenkeypoints, terminal 2021 may also determine that when coordinates of akeypoint in three-dimensional data are converted into a position in aspace of another three-dimensional data, a keypoint closest to theposition is a corresponding keypoint.

When the position information based on the relative position describedabove is used, terminal 2021 that uses mutually differentthree-dimensional data or services can identify or estimate a positionindicated by the position information with respect to a common keypointincluded in or associated with each three-dimensional data. As a result,terminal 2021 that uses the mutually different three-dimensional data orthe services can identify or estimate the same position with higheraccuracy.

Even when map data or three-dimensional data represented using mutuallydifferent coordinate systems are used, since it is possible to reducethe effects of errors caused by the conversion of a coordinate system,it is possible to coordinate services based on more accurate positioninformation.

Hereinafter, an example of functions provided by data collection server2024 will be described. Data collection server 2024 may transferreceived position-related data to another data server. When there aredata servers, data collection server 2024 determines to which dataserver received position-related data is to be transferred, andtransfers the position-related data to a data server determined as atransfer destination.

Data collection server 2024 determines a transfer destination based on,for example, transfer destination server determination rules preset todata collection server 2024. The transfer destination serverdetermination rules are set by, for example, a transfer destinationtable in which identifiers respectively associated with terminals 2021are associated with transfer destination data servers.

Terminal 2021 appends an identifier associated with terminal 2021 toposition-related data to be transmitted, and transmits theposition-related data to data collection server 2024. Data collectionserver 2024 determines a transfer destination data server correspondingto the identifier appended to the position-related data, based on thetransfer destination server determination rules set out using thetransfer destination table etc.; and transmits the position-related datato the determined data server. The transfer destination serverdetermination rules may be specified based on a determination conditionset using a time, a place, etc. at which position-related data isobtained. Here, examples of the identifier associated with transmissionsource terminal 2021 include an identifier unique to each terminal 2021or an identifier indicating a group to which terminal 2021 belongs.

The transfer destination table need not be a table in which identifiersassociated with transmission source terminals are directly associatedwith transfer destination data servers. For example, data collectionserver 2024 holds a management table that stores tag informationassigned to each identifier unique to terminal 2021, and a transferdestination table in which the pieces of tag information are associatedwith transfer destination data servers. Data collection server 2024 maydetermine a transfer destination data server based on tag information,using the management table and the transfer destination table. Here, thetag information is, for example, control information for management orcontrol information for providing service assigned to a type, a modelnumber, an owner of terminal 2021 corresponding to the identifier, agroup to which terminal 2021 belongs, or another identifier. Moreover,in the transfer destination able, identifiers unique to respectivesensors may be used instead of the identifiers associated withtransmission source terminals 2021. Furthermore, the transferdestination server determination rules may be set by client device 2026.

Data collection server 2024 may determine data servers as transferdestinations, and transfer received position-related data to the dataservers. According to this configuration, for example, whenposition-related data is automatically backed up or when, in order thatposition-related data is commonly used by different services, there is aneed to transmit the position-related data to a data server forproviding each service, it is possible to achieve data transfer asintended by changing a setting of data collection server 2024. As aresult, it is possible to reduce the number of steps necessary forbuilding and changing a system, compared to when a transmissiondestination of position-related data is set for each terminal 2021.

Data collection server 2024 may register, as a new transfer destination,a data server specified by a transfer request signal received from adata server; and transmit position-related data subsequently received tothe data server, in response to the transfer request signal.

Data collection server 2024 may store position-related data receivedfrom terminal 2021 into a recording device, and transmitposition-related data specified by a transmission request signalreceived from terminal 2021 or a data server to request source terminal2021 or the data server in response to the transmission request signal.

Data collection server 2024 may determine whether position-related datais suppliable to a request source data server or terminal 2021, andtransfer or transmit the position-related data to the request sourcedata server or terminal 2021 when determining that the position-relateddata is suppliable.

When data collection server 2024 receives a request for currentposition-related data from client device 2026, even if it is not atiming for transmitting position-related data by terminal 2021, datacollection server 2024 may send a transmission request for the currentposition-related data to terminal 2021, and terminal 2021 may transmitthe current position-related data in response to the transmissionrequest.

Although terminal 2021 transmits position information data to datacollection server 2024 in the above description, data collection server2024 may have a function of managing terminal 2021 such as a functionnecessary for collecting position-related data from terminal 2021 or afunction used when collecting position-related data from terminal 2021.

Data collection server 2024 may have a function of transmitting, toterminal 2021, a data request signal for requesting transmission ofposition information data, and collecting position-related data.

Management information such as an address for communicating withterminal 2021 from which data is to be collected or an identifier uniqueto terminal 2021 is registered in advance in data collection server2024. Data collection server 2024 collects position-related data fromterminal 2021 based on the registered management information. Managementinformation may include information such as types of sensors included interminal 2021, the number of sensors included in terminal 2021, andcommunication systems supported by terminal 2021.

Data collection server 2024 may collect information such as an operatingstate or a current position of terminal 2021 from terminal 2021.

Registration of management information may be instructed by clientdevice 2026, or a process for the registration may be started byterminal 2021 transmitting a registration request to data collectionserver 2024. Data collection server 2024 may have a function ofcontrolling communication between data collection server 2024 andterminal 2021.

Communication between data collection server 2024 and terminal 2021 maybe established using a dedicated line provided by a service providersuch as a mobile network operator (MNO) or a mobile virtual networkoperator (MVNO), or a virtual dedicated line based on a virtual privatenetwork (VPN). According to this configuration, it is possible toperform secure communication between terminal 2021 and data collectionserver 2024.

Data collection server 2024 may have a function of authenticatingterminal 2021 or a function of encrypting data to be transmitted andreceived between data collection server 2024 and terminal 2021. Here,the authentication of terminal 2021 or the encryption of data isperformed using, for example, an identifier unique to terminal 2021 oran identifier unique to a terminal group including terminals 2021, whichis shared in advance between data collection server 2024 and terminal2021. Examples of the identifier include an international mobilesubscriber identity (IMSI) that is a unique number stored in asubscriber identity module (SIM) card. An identifier for use inauthentication and an identifier for use in encryption of data may beidentical or different.

The authentication or the encryption of data between data collectionserver 2024 and terminal 2021 is feasible when both data collectionserver 2024 and terminal 2021 have a function of performing the process.The process does not depend on a communication system used bycommunication device 2022 that performs relay. Accordingly, since it ispossible to perform the common authentication or encryption withoutconsidering whether terminal 2021 uses a communication system, theuser's convenience of system architecture is increased. However, theexpression “does not depend on a communication system used bycommunication device 2022 that performs relay” means a change accordingto a communication system is not essential. In other words, in order toimprove the transfer efficiency or ensure security, the authenticationor the encryption of data between data collection server 2024 andterminal 2021 may be changed according to a communication system used bya relay device.

Data collection server 2024 may provide client device 2026 with a UserInterface (UI) that manages data collection rules such as types ofposition-related data collected from terminal 2021 and data collectionschedules. Accordingly, a user can specify, for example, terminal 2021from which data is to be collected using client device 2026, a datacollection time, and a data collection frequency. Additionally, datacollection server 2024 may specify, for example, a region on a map fromwhich data is to be desirably collected, and collect position-relateddata from terminal 2021 included in the region.

When the data collection rules are managed on a per terminal 2021 basis,client device 2026 presents, on a screen, a list of terminals 2021 orsensors to be managed. The user sets, for example, a necessity for datacollection or a collection schedule for each item in the list.

When a region on a map from which data is to be desirably collected isspecified, client device 2026 presents, on a screen, a two-dimensionalor three-dimensional map of a region to be managed. The user selects theregion from which data is to be collected on the displayed map. Examplesof the region selected on the map include a circular or rectangularregion having a point specified on the map as the center, or a circularor rectangular region specifiable by a drag operation. Client device2026 may also select a region in a preset unit such as a city, an areaor a block in a city, or a main road, etc. Instead of specifying aregion using a map, a region may be set by inputting values of alatitude and a longitude, or a region may be selected from a list ofcandidate regions derived based on inputted text information. Textinformation is, for example, a name of a region, a city, or a landmark.

Moreover, data may be collected while the user dynamically changes aspecified region by specifying one or more terminals 2021 and setting acondition such as within 100 meters of one or more terminals 2021.

When client device 2026 includes a sensor such as a camera, a region ona map may be specified based on a position of client device 2026 in anactual space obtained from sensor data. For example, client device 2026may estimate a self-location using sensor data, and specify, as a regionfrom which data is to be collected, a region within a predetermineddistance from a point on a map corresponding to the estimated locationor a region within a distance specified by the user. Client device 2026may also specify, as the region from which the data is to be collected,a sensing region of the sensor, that is, a region corresponding toobtained sensor data. Alternatively, client device 2026 may specify, asthe region from which the data is to be collected, a region based on alocation corresponding to sensor data specified by the user. Eitherclient device 2026 or data collection server 2024 may estimate a regionon a map or a location corresponding to sensor data.

When a region on a map is specified, data collection server 2024 mayspecify terminal 2021 within the specified region by collecting currentposition information of each terminal 2021, and may send a transmissionrequest for position-related data to specified terminal 2021. When datacollection server 2024 transmits information indicating a specifiedregion to terminal 2021, determines whether terminal 2021 is presentwithin the specified region, and determines that terminal 2021 ispresent within the specified region, rather than specifying terminal2021 within the region, terminal 2021 may transmit position-relateddata.

Data collection server 2024 transmits, to client device 2026, data suchas a list or a map for providing the above-described User Interface (UI)in an application executed by client device 2026. Data collection server2024 may transmit, to client device 2026, not only the data such as thelist or the map but also an application program. Additionally, the aboveUI may be provided as contents created using HTML displayable by abrowser. It should be noted that part of data such as map data may besupplied from a server, such as map server 2025, other than datacollection server 2024.

When client device 2026 receives an input for notifying the completionof an input such as pressing of a setup key by the user, client device2026 transmits the inputted information as configuration information todata collection server 2024. Data collection server 2024 transmits, toeach terminal 2021, a signal for requesting position-related data ornotifying position-related data collection rules, based on theconfiguration information received from client device 2026, and collectsthe position-related data.

Next, an example of controlling operation of terminal 2021 based onadditional information added to three-dimensional or two-dimensional mapdata will be described.

In the present configuration, object information that indicates aposition of a power feeding part such as a feeder antenna or a feedercoil for wireless power feeding buried under a road or a parking lot isincluded in or associated with three-dimensional data, and such objectinformation is provided to terminal 2021 that is a vehicle or a drone.

A vehicle or a drone that has obtained the object information to getcharged automatically moves so that a position of a charging part suchas a charging antenna or a charging coil included in the vehicle or thedrone becomes opposite to a region indicated by the object information,and such vehicle or a drone starts to charge itself. It should be notedthat when a vehicle or a drone has no automatic driving function, adirection to move in or an operation to perform is presented to a driveror an operator by using an image displayed on a screen, audio, etc. Whena position of a charging part calculated based on an estimatedself-location is determined to fall within the region indicated by theobject information or a predetermined distance from the region, an imageor audio to be presented is changed to a content that puts a stop todriving or operating, and the charging is started.

Object information need not be information indicating a position of apower feeding part, and may be information indicating a region withinwhich placement of a charging part results in a charging efficiencygreater than or equal to a predetermined threshold value. A positionindicated by object information may be represented by, for example, thecentral point of a region indicated by the object information, a regionor a line within a two-dimensional plane, or a region, a line, or aplane within a three-dimensional space.

According to this configuration, since it is possible to identify theposition of the power feeding antenna unidentifiable by sensing data ofLiDER or an image captured by the camera, it is possible to highlyaccurately align a wireless charging antenna included in terminal 2021such as a vehicle with a wireless power feeding antenna buried under aroad. As a result, it is possible to increase a charging speed at thetime of wireless charging and improve the charging efficiency.

Object information may be an object other than a power feeding antenna.For example, three-dimensional data includes, for example, a position ofan AP for millimeter-wave wireless communication as object information.Accordingly, since terminal 2021 can identify the position of the AP inadvance, terminal 2021 can steer a directivity of beam to a direction ofthe object information and start communication. As a result, it ispossible to improve communication quality such as increasingtransmission rates, reducing the duration of time before startingcommunication, and extending a communicable period.

Object information may include information indicating a type of anobject corresponding to the object information. In addition, whenterminal 2021 is present within a region in an actual spacecorresponding to a position in three-dimensional data of the objectinformation or within a predetermined distance from the region, theobject information may include information indicating a process to beperformed by terminal 2021.

Object information may be provided by a server different from a serverthat provides three-dimensional data. When object information isprovided separately from three-dimensional data, object groups in whichobject information used by the same service is stored may be eachprovided as separate data according to a type of a target service or atarget device.

Three-dimensional data used in combination with object information maybe point cloud data of WLD or keypoint data of SWLD.

Embodiment 6

Hereinafter, a scan order of an octree representation and voxels will bedescribed. A volume is encoded after being converted into an octreestructure (made into an octree). The octree structure includes nodes andleaves. Each node has eight nodes or leaves, and each leaf has voxel(VXL) information. FIG. 22 is a diagram showing an example structure ofa volume including voxels. FIG. 23 is a diagram showing an example ofthe volume shown in FIG. 22 having been converted into the octreestructure. Among the leaves shown in FIG. 23 , leaves 1, 2, and 3respectively represent VXL 1, VXL 2, and VXL 3, and represent VXLsincluding a point group (hereinafter, active VXLs).

An octree is represented by, for example, binary sequences of 1s and 0s.For example, when giving the nodes or the active VXLs a value of 1 andeverything else a value of 0, each node and leaf is assigned with thebinary sequence shown in FIG. 23 . Thus, this binary sequence is scannedin accordance with a breadth-first or a depth-first scan order. Forexample, when scanning breadth-first, the binary sequence shown in A ofFIG. 24 is obtained. When scanning depth-first, the binary sequenceshown in B of FIG. 24 is obtained. The binary sequences obtained throughthis scanning are encoded through entropy encoding, which reduces anamount of information.

Depth information in the octree representation will be described next.Depth in the octree representation is used in order to control up to howfine a granularity point cloud information included in a volume isstored. Upon setting a great depth, it is possible to reproduce thepoint cloud information to a more precise level, but an amount of datafor representing the nodes and leaves increases. Upon setting a smalldepth, however, the amount of data decreases, but some information thatthe point cloud information originally held is lost, since pieces ofpoint cloud information including different positions and differentcolors are now considered as pieces of point cloud information includingthe same position and the same color.

For example, FIG. 25 is a diagram showing an example in which the octreewith a depth of 2 shown in FIG. 23 is represented with a depth of 1. Theoctree shown in FIG. 25 has a lower amount of data than the octree shownin FIG. 23 . In other words, the binarized octree shown in FIG. 25 has alower bit count than the octree shown in FIG. 23 . Leaf 1 and leaf 2shown in FIG. 23 are represented by leaf 1 shown in FIG. 24 . In otherwords, the information on leaf 1 and leaf 2 being in different positionsis lost.

FIG. 26 is a diagram showing a volume corresponding to the octree shownin FIG. 25 . VXL 1 and VXL 2 shown in FIG. 22 correspond to VXL 12 shownin FIG. 26 . In this case, the three-dimensional data encoding devicegenerates color information of VXL 12 shown in FIG. 26 using colorinformation of VXL 1 and VXL 2 shown in FIG. 22 . For example, thethree-dimensional data encoding device calculates an average value, amedian, a weighted average value, or the like of the color informationof VXL 1 and VXL 2 as the color information of VXL 12. In this manner,the three-dimensional data encoding device may control a reduction ofthe amount of data by changing the depth of the octree.

The three-dimensional data encoding device may set the depth informationof the octree to units of worlds, units of spaces, or units of volumes.In this case, the three-dimensional data encoding device may append thedepth information to header information of the world, header informationof the space, or header information of the volume. In all worlds,spaces, and volumes associated with different times, the same value maybe used as the depth information. In this case, the three-dimensionaldata encoding device may append the depth information to headerinformation managing the worlds associated with all times.

Embodiment 7

Hereinafter, a method using a RAHT (Region Adaptive HierarchicalTransform) will be described as another method of encoding the attributeinformation of a three-dimensional point. FIG. 27 is a diagram fordescribing the encoding of the attribute information by using a RAHT.

First, the three-dimensional data encoding device generates Morton codesbased on the geometry information of three-dimensional points, and sortsthe attribute information of the three-dimensional points in the orderof the Morton codes. For example, the three-dimensional data encodingdevice may perform sorting in the ascending order of the Morton codes.Note that the sorting order is not limited to the order of the Mortoncodes, and other orders may be used.

Next, the three-dimensional data encoding device generates ahigh-frequency component and a low-frequency component of the layer L byapplying the Haar conversion to the attribute information of twoadjacent three-dimensional points in the order of the Morton codes. Forexample, the three-dimensional data encoding device may use the Haarconversion of 2×2 matrices. The generated high-frequency component isincluded in a coding coefficient as the high-frequency component of thelayer L, and the generated low-frequency component is used as the inputvalue for the higher layer L+1 of the layer L.

After generating the high-frequency component of the layer L by usingthe attribute information of the layer L, the three-dimensional dataencoding device subsequently performs processing of the layer L+1. Inthe processing of the layer L+1, the three-dimensional data encodingdevice generates a high-frequency component and a low-frequencycomponent of the layer L+1 by applying the Haar conversion to twolow-frequency components obtained by the Haar conversion of theattribute information of the layer L. The generated high-frequencycomponent is included in a coding coefficient as the high-frequencycomponent of the layer L+1, and the generated low-frequency component isused as the input value for the higher layer L+2 of the layer L+1.

The three-dimensional data encoding device repeats such layerprocessing, and determines that the highest layer Lmax has been reachedat the time when a low-frequency component that is input to a layerbecomes one. The three-dimensional data encoding device includes thelow-frequency component of the layer Lmax−1 that is input to the LayerLmax in a coding coefficient. Then, the value of the low-frequencycomponent or high-frequency component included in the coding coefficientis quantized, and is encoded by using entropy encoding or the like.

Note that, when only one three-dimensional point exists as two adjacentthree-dimensional points at the time of application of the Haarconversion, the three-dimensional data encoding device may use the valueof the attribute information of the existing one three-dimensional pointas the input value for a higher layer.

In this manner, the three-dimensional data encoding devicehierarchically applies the Haar conversion to the input attributeinformation, generates a high-frequency component and a low-frequencycomponent of the attribute information, and performs encoding byapplying quantization described later or the like. Accordingly, thecoding efficiency can be improved.

When the attribute information is N dimensional, the three-dimensionaldata encoding device may independently apply the Haar conversion foreach dimension, and may calculate each coding coefficient. For example,when the attribute information is color information (RGB, YUV, or thelike), the three-dimensional data encoding device applies the Haarconversion for each component, and calculates each coding coefficient.

The three-dimensional data encoding device may apply the Haar conversionin the order of the layers L, L+1, . . . , Lmax. The closer to the layerLmax, a coding coefficient including the more low-frequency componentsof the input attribute information is generated.

w0 and w1 shown in FIG. 27 are the weights assigned to eachthree-dimensional point. For example, the three-dimensional dataencoding device may calculate the weight based on the distanceinformation between two adjacent three-dimensional points to which theHaar conversion is applied, or the like. For example, thethree-dimensional data encoding device may improve the coding efficiencysuch that the closer the distance, the greater the weight. Note that thethree-dimensional data encoding device may calculate this weight withanother technique, or need not use the weight.

In the example shown in FIG. 27 , the pieces of the input attributeinformation are a0, a1, a2, a3, a4, and a5. Additionally, Ta1, Ta5, Tb1,Tb3, Tc1, and d0 are encoded among the coding coefficients after theHaar conversion. The other coding coefficients (b0, b2, bc0 and thelike) are medians, and are not encoded.

Specifically, in the example shown in FIG. 27 , the high-frequencycomponent Ta1 and the low-frequency component b0 are generated byperforming the Haar conversion on a0 and a1. Here, when the weights w0and w1 are equal, the low-frequency component b0 is the average value ofa0 and a1, and the high-frequency component Ta1 is the differencebetween a0 and a1.

Since there is no attribute information to be paired with a2, a2 is usedas b1 as is. Similarly, since there is no attribute information to bepaired with a3, a3 is used as b2 as is. Additionally, the high-frequencycomponent Ta5 and the low-frequency component b3 are generated byperforming the Haar conversion on a4 and a5.

In the layer L+1, the high-frequency component Tb1 and the low-frequencycomponent c0 are generated by performing the Haar conversion on b0 andb1. Similarly, the high-frequency component Tb3 and the low-frequencycomponent c1 are generated by performing the Haar conversion on b2 andb3.

In the layer Lmax−1, the High-frequency component Tc1 and thelow-frequency component d0 are generated by performing the Haarconversion on c0 and c1.

The three-dimensional data encoding device may encode the codingcoefficients to which the Haar conversion has been applied, afterquantizing the coding coefficients. For example, the three-dimensionaldata encoding device performs quantization by dividing the codingcoefficient by the quantization scale (also called the quantization step(QS)). In this case, the smaller the quantization scale, the smaller theerror (quantization error) that may occur due to quantization.Conversely, the larger the quantization scale, the larger thequantization error.

Note that the three-dimensional data encoding device may change thevalue of the quantization scale for each layer. FIG. 28 is a diagramshowing an example of setting the quantization scale for each layer. Forexample, the three-dimensional data encoding device sets smallerquantization scales to the higher layers, and larger quantization scalesto the lower layers. Since the coding coefficients of thethree-dimensional points belonging to the higher layers include morelow-frequency components than the lower layers, there is a highpossibility that the coding coefficients are important components inhuman visual characteristics and the like. Therefore, by suppressing thequantization error that may occur in the higher layers by making thequantization scales for the higher layers small, visual deteriorationcan be suppressed, and the coding efficiency can be improved.

Note that the three-dimensional data encoding device may add thequantization scale for each layer to a header or the like. Accordingly,the three-dimensional decoding device can correctly decode thequantization scale, and can appropriately decode a bitstream.

Additionally, the three-dimensional data encoding device may adaptivelyswitch the value of the quantization scale according to the importanceof a current three-dimensional point to be encoded. For example, thethree-dimensional data encoding device uses a small quantization scalefor a three-dimensional point with high importance, and uses a largequantization scale for a three-dimensional point with low importance.For example, the three-dimensional data encoding device may calculatethe importance from the weight at the time of the Haar conversion, orthe like. For example, the three-dimensional data encoding device maycalculate the quantization scale by using the sum of w0 and w1. In thismanner, by making the quantization scale of a three-dimensional pointwith high importance small, the quantization error becomes small, andthe coding efficiency can be improved.

Additionally, the value of the QS may be made smaller for the higherlayers. Accordingly, the higher the layer, the larger the value of theQW, and the prediction efficiency can be improved by suppressing thequantization error of the three-dimensional point.

Here, a coding coefficient Ta1q after quantization of the codingcoefficient Ta1 of the attribute information a1 is represented byTa1/QS_L. Note that QS may be the same value in all the layers or a partof the layers. The QW (Quantization Weight) is the value that representsthe importance of a current three-dimensional point to be encoded. Forexample, the above-described sum of w0 and w1 may be used as the QW.Accordingly, the higher the layer, the larger the value of the QW, andthe prediction efficiency can be improved by suppressing thequantization error of the three-dimensional point.

For example, the three-dimensional data encoding device may firstinitialize the values of the QWs of all the three-dimensional pointswith 1, and may update the QW of each three-dimensional point by usingthe values of w0 and w1 at the time of the Haar conversion.Alternatively, the three-dimensional data encoding device may change theinitial value according to the layers, without initializing the valuesof the QWs of all the three-dimensional points with a value of 1. Forexample, the quantization scales for the higher layers becomes small bysetting larger QW initial values for the higher layers. Accordingly,since the prediction error in the higher layers can be suppressed, theprediction accuracy of the lower layers can be increased, and the codingefficiency can be improved. Note that the three-dimensional dataencoding device need not necessarily use the QW.

When using the QW, the quantized value Ta1q of Ta1 is calculated by(Equation K1) and (Equation K2).

[Math. 1] $\begin{matrix}{{{Ta}1q} = {\frac{{{Ta}1} + \frac{{QS}\_ L}{2}}{{OS\_ LoD}1} \times {{QWTa}1}}} & \left( {{Equation}\mspace{14mu}{K1}} \right) \\{{{QWTa}1} = {1 + {\sum\limits_{i = 0}^{1}\; w_{i}}}} & \left( {{Equation}\mspace{14mu}{K2}} \right)\end{matrix}$

Additionally, the three-dimensional data encoding device scans andencodes the coding coefficients (unsigned integer values) afterquantization in a certain order. For example, the three-dimensional dataencoding device encodes a plurality of three-dimensional points from thethree-dimensional points included in the higher layers toward the lowerlayers in order.

For example, in the example shown in FIG. 27 , the three-dimensionaldata encoding device encodes a plurality of three-dimensional points inthe order of Tc1q Tb1q, Tb3q, Ta1q, and Ta5q from d0q included in thehigher layer Lmax. Here, there is a tendency that the lower the layer L,the more likely it is that the coding coefficient after quantizationbecomes 0. This can be due to the following and the like.

Since the coding coefficient of the lower layer L shows a higherfrequency component than the higher layers, there is a tendency that thecoding coefficient becomes 0 depending on a current three-dimensionalpoint. Additionally, by switching the quantization scale according tothe above-described importance or the like, the lower the layer, thelarger the quantization scales, and the more likely it is that thecoding coefficient after quantization becomes 0.

In this manner, the lower the layer, the more likely it is that thecoding coefficient after quantization becomes 0, and the value 0consecutively occurs in the first code sequence. FIG. 29 is a diagramshowing an example of the first code sequence and the second codesequence.

The three-dimensional data encoding device counts the number of timesthat the value 0 occurs in the first code sequence, and encodes thenumber of times that the value 0 consecutively occurs, instead of theconsecutive values 0. That is, the three-dimensional data encodingdevice generates a second code sequence by replacing the codingcoefficient of the consecutive values 0 in the first code sequence withthe number of consecutive times (ZeroCnt) of 0. Accordingly, when thereare consecutive values 0 of the coding coefficients after quantization,the coding efficiency can be improved by encoding the number ofconsecutive times of 0, rather than encoding a lot of 0s.

Additionally, the three-dimensional data encoding device may entropyencode the value of ZeroCnt. For example, the three-dimensional dataencoding device binarizes the value of ZeroCnt with the truncated unarycode of the total number T of the encoded three-dimensional points, andarithmetically encodes each bit after the binarization. FIG. 30 is adiagram showing an example of the truncated unary code in the case wherethe total number of encoded three-dimensional points is T. At this time,the three-dimensional data encoding device may improve the codingefficiency by using a different coding table for each bit. For example,the three-dimensional data encoding device uses coding table 1 for thefirst bit, uses coding table 2 for the second bit, and coding table 3for the subsequent bits. In this manner, the three-dimensional dataencoding device can improve the coding efficiency by switching thecoding table for each bit.

Additionally, the three-dimensional data encoding device mayarithmetically encode ZeroCnt after binarizing ZeroCnt with anExponential-Golomb. Accordingly, when the value of ZeroCnt easilybecomes large, the efficiency can be more improved than the binarizedarithmetic encoding with the truncated unary code. Note that thethree-dimensional data encoding device may add a flag for switchingbetween using the truncated unary code and using the Exponential-Golombto a header. Accordingly, the three-dimensional data encoding device canimprove the coding efficiency by selecting the optimum binarizationmethod. Additionally, the three-dimensional data decoding device cancorrectly decode a bitstream by referring to the flag included in theheader to switch the binarization method.

The three-dimensional decoding device may convert the decoded codingcoefficient after the quantization from an unsigned integer value to asigned integer value with a method contrary to the method performed bythe three-dimensional data encoding device. Accordingly, when the codingcoefficient is entropy encoded, the three-dimensional decoding devicecan appropriately decode a bitstream generated without considering theoccurrence of a negative integer. Note that the three-dimensionaldecoding device does not necessarily need to convert the codingcoefficient from an unsigned integer value to a signed integer value.For example, when decoding a bitstream including an encoded bit that hasbeen separately entropy encoded, the three-dimensional decoding devicemay decode the sign bit.

The three-dimensional decoding device decodes the coding coefficientafter the quantization converted to the signed integer value, by theinverse quantization and the inverse Haar conversion. Additionally, thethree-dimensional decoding device utilizes the coding coefficient afterthe decoding for the prediction after the current three-dimensionalpoint to be decoded. Specifically, the three-dimensional decoding devicecalculates the inverse quantized value by multiplying the codingcoefficient after the quantization by the decoded quantization scale.Next, the three-dimensional decoding device obtains the decoded value byapplying the inverse Haar conversion described later to the inversequantized value.

For example, the three-dimensional decoding device converts the decodedunsigned integer value to a signed integer value with the followingmethod. When the LSB (least significant bit) of the decoded unsignedinteger value a2u is 1, the signed integer value Ta1q is set to−((a2u+1)>>1). When the LSB of the decoded unsigned integer value a2u isnot 1 (when it is 0), the signed integer value Ta1q is set to (a2u>>1).

Additionally, the inverse quantized value of Ta1 is represented byTa1q×QS_L. Here, Ta1q is the quantized value of Ta1. In addition, QS_Lis the quantization step for the layer L.

Additionally, the QS may be the same value for all the layers or a partof the layers. In addition, the three-dimensional data encoding devicemay add the information indicating the QS to a header or the like.Accordingly, the three-dimensional decoding device can correctly performinverse quantization by using the same QS as the QS used by thethree-dimensional data encoding device.

Next, the inverse Haar conversion will be described. FIG. 31 is adiagram for describing the inverse Haar conversion. Thethree-dimensional decoding device decodes the attribute value of athree-dimensional point by applying the inverse Haar conversion to thecoding coefficient after the inverse quantization.

First, the three-dimensional decoding device generates the Morton codesbased on the geometry information of three-dimensional points, and sortsthe three-dimensional points in the order of the Morton codes. Forexample, the three-dimensional decoding device may perform the sortingin ascending order of the Morton codes. Note that the sorting order isnot limited to the order of the Morton codes, and the other order may beused.

Next, the three-dimensional decoding device restores the attributeinformation of three-dimensional points that are adjacent to each otherin the order of the Morton codes in the layer L, by applying the inverseHaar conversion to the coding coefficient including the low-frequencycomponent of the layer L+1, and the coding coefficient including thehigh-frequency component of the layer L. For example, thethree-dimensional decoding device may use the inverse Haar conversion ofa 2×2 matrix. The attribute information of the restored layer L is usedas the input value for the lower layer L−1.

The three-dimensional decoding device repeats such layer processing, andends the processing when all the attribute information of the bottomlayer is decoded. Note that, when only one three-dimensional pointexists as two three-dimensional points that are adjacent to each otherin the layer L−1 at the time of application of the inverse Haarconversion, the three-dimensional decoding device may assign the valueof the encoding component of the layer L to the attribute value of theone existing three-dimensional point. Accordingly, the three-dimensionaldecoding device can correctly decode a bitstream with improved codingefficiency by applying the Haar conversion to all the values of theinput attribute information.

When the attribute information is N dimensional, the three-dimensionaldecoding device may independently apply the inverse Haar conversion foreach dimension, and may decode each coding coefficient. For example,when the attribute information is color information (RGB, YUV, or thelike), the three-dimensional data decoding device applies the inverseHaar conversion to the coding coefficient for each component, anddecodes each attribute value.

The three-dimensional decoding device may apply the inverse Haarconversion in the order of Layers Lmax, L+1, . . . , L. Additionally, w0and w1 shown in FIG. 31 are the weights assigned to eachthree-dimensional point. For example, the three-dimensional datadecoding device may calculate the weight based on the distanceinformation between two adjacent three-dimensional points to which theinverse Haar conversion is applied, or the like. For example, thethree-dimensional data encoding device may decode a bitstream withimproved coding efficiency such that the closer the distance, thegreater the weight.

In the example shown in FIG. 31 , the coding coefficients after theinverse quantization are Ta1, Ta5, Tb1, Tb3, Tc1, and d0, and a0, a1,a2, a3, a4, and a5 are obtained as the decoded values.

FIG. 32 is a diagram showing a syntax example of the attributeinformation (attribute_data). The attribute information (attribute_data)includes the number of consecutive zeros (ZeroCnt), the number ofattribute dimensions (attribute_dimension), and the coding coefficient(value [j] [i]).

The number of consecutive zeros (ZeroCnt) indicates the number of timesthat the value 0 continues in the coding coefficient after quantization.Note that the three-dimensional data encoding device may arithmeticallyencode ZeroCnt after binarizing ZeroCnt.

Additionally, as shown in FIG. 32 , the three-dimensional data encodingdevice may determine whether or not the layer L (layerL) to which thecoding coefficient belongs is equal to or more than a predefinedthreshold value TH_layer, and may switch the information added to abitstream according to the determination result. For example, when thedetermination result is true, the three-dimensional data encoding deviceadds all the coding coefficients of the attribute information to abitstream. In addition, when the determination result is false, thethree-dimensional data encoding device may add a part of the codingcoefficients to a bitstream.

Specifically, when the determination result is true, thethree-dimensional data encoding device adds the encoded result of thethree-dimensional information of the color information RGB or YUV to abitstream. When the determination result is false, the three-dimensionaldata encoding device may add a part of information such as G or Y of thecolor information to a bitstream, and need not to add the othercomponents to the bitstream. In this manner, the three-dimensional dataencoding device can improve the coding efficiency by not adding a partof the coding coefficients of the layer (the layer smaller thanTH_layer) including the coding coefficients indicating thehigh-frequency component with less visually noticeable degradation to abitstream.

The number of attribute dimensions (attribute_dimension) indicates thenumber of dimensions of the attribute information. For example, when theattribute information is the color information (RGB, YUV, or the like)of a three-dimensional point, since the color information isthree-dimensional, the number of attribute dimensions is set to a value3. When the attribute information is the reflectance, since thereflectance is one-dimensional, the number of attribute dimensions isset to a value 1. Note that the number of attribute dimensions may beadded to the header of the attribute information of a bit stream or thelike.

The coding coefficient (value [j] [i]) indicates the coding coefficientafter quantization of the attribute information of the j-th dimension ofthe i-th three-dimensional point. For example, when the attributeinformation is color information, value [99] [1] indicates the codingcoefficient of the second dimension (for example, the G value) of the100th three-dimensional point. Additionally, when the attributeinformation is reflectance information, value [119] [0] indicates thecoding coefficient of the first dimension (for example, the reflectance)of the 120th three-dimensional point.

Note that, when the following conditions are satisfied, thethree-dimensional data encoding device may subtract the value 1 fromvalue [j] Lit and may entropy encode the obtained value. In this case,the three-dimensional data decoding device restores the codingcoefficient by adding the value 1 to value W [i] after entropy decoding.

The above-described conditions are (1) when attribute_dimension=1, or(2) when attribute_dimension is 1 or more, and when the values of allthe dimensions are equal. For example, when the attribute information isthe reflectance, since attribute_dimension=1, the three-dimensional dataencoding device subtracts the value 1 from the coding coefficient tocalculate value, and encodes the calculated value. The three-dimensionaldecoding device calculates the coding coefficient by adding the value 1to the value after decoding.

More specifically, for example, when the coding coefficient of thereflectance is 10, the three-dimensional data encoding device encodesthe value 9 obtained by subtracting the value 1 from the value 10 of thecoding coefficient. The three-dimensional data decoding device adds thevalue 1 to the decoded value 9 to calculate the value 10 of the codingcoefficient.

Additionally, since attribute_dimension=3 when the attribute informationis the color, for example, when the coding coefficient afterquantization of each of the components R, G, and B is the same, thethree-dimensional data encoding device subtracts the value 1 from eachcoding coefficient, and encodes the obtained value. Thethree-dimensional data decoding device adds the value 1 to the valueafter decoding. More specifically, for example, when the codingcoefficient of R, G, and B=(1, 1, 1), the three-dimensional dataencoding device encodes (0, 0, 0). The three-dimensional data decodingdevice adds 1 to each component of (0, 0, 0) to calculate (1, 1, 1).Additionally, when the coding coefficients of R, G, and B=(2, 1, 2), thethree-dimensional data encoding device encodes (2, 1, 2) as is. Thethree-dimensional data decoding device uses the decoded (2, 1, 2) as isas the coding coefficients.

In this manner, by providing ZeroCnt, since the pattern in which all thedimensions are 0 as value is not generated, the value obtained bysubtracting 1 from the value indicated by value can be encoded.Therefore, the coding efficiency can be improved.

Additionally, value [0] [i] shown in FIG. 32 indicates the codingcoefficient after quantization of the attribute information of the firstdimension of the i-th three-dimensional point. As shown in FIG. 32 ,when the layer L (layerL) to which the coding coefficient belongs issmaller than the threshold value TH_layer, the code amount may bereduced by adding the attribute information of the first dimension to abitstream (not adding the attribute information of the second andfollowing dimensions to the bitstream).

The three-dimensional data encoding device may switch the calculationmethod of the value of ZeroCnt depending on the value ofattribute_dimension. For example, when attribute_dimension=3, thethree-dimensional data encoding device may count the number of timesthat the values of the coding coefficients of all the components(dimensions) become 0. FIG. 33 is a diagram showing an example of thecoding coefficient and ZeroCnt in this case. For example, in the case ofthe color information shown in FIG. 33 , the three-dimensional dataencoding device counts the number of the consecutive coding coefficientshaving 0 for all of the R, G, and B components, and adds the countednumber to a bitstream as ZeroCnt. Accordingly, it becomes unnecessary toencode ZeroCnt for each component, and the overhead can be reduced.Therefore, the coding efficiency can be improved. Note that thethree-dimensional data encoding device may calculate ZeroCnt for eachdimension even when attribute_dimension is two or more, and may add thecalculated ZeroCnt to a bitstream.

FIG. 34 is a flowchart of the three-dimensional data encoding processingaccording to the present embodiment. First, the three-dimensional dataencoding device encodes geometry information (geometry) (S6601). Forexample, the three-dimensional data encoding device performs encoding byusing an octree representation.

Next, the three-dimensional data encoding device converts the attributeinformation (S6602). For example, after the encoding of the geometryinformation, when the position of a three-dimensional point is changeddue to quantization or the like, the three-dimensional data encodingdevice reassigns the attribute information of the originalthree-dimensional point to the three-dimensional point after the change.Note that the three-dimensional data encoding device may interpolate thevalue of the attribute information according to the amount of change ofthe position to perform the reassignment. For example, thethree-dimensional data encoding device detects N three-dimensionalpoints before the change near the three dimensional position after thechange, performs the weighted averaging of the value of the attributeinformation of the N three-dimensional points based on the distance fromthe three-dimensional position after the change to each of the Nthree-dimensional points, and sets the obtained value as the value ofthe attribute information of the three-dimensional point after thechange. Additionally, when two or more three-dimensional points arechanged to the same three-dimensional position due to quantization orthe like, the three-dimensional data encoding device may assign theaverage value of the attribute information in the two or morethree-dimensional points before the change as the value of the attributeinformation after the change.

Next, the three-dimensional data encoding device encodes the attributeinformation (S6603). For example, when encoding a plurality of pieces ofattribute information, the three-dimensional data encoding device mayencode the plurality of pieces of attribute information in order. Forexample, when encoding the color and the reflectance as the attributeinformation, the three-dimensional data encoding device generates abitstream to which the encoding result of the reflectance is added afterthe encoding result of the color. Note that a plurality of encodingresults of the attribute information added to a bitstream may be in anyorder.

Additionally, the three-dimensional data encoding device may add theinformation indicating the start location of the encoded data of eachattribute information in a bitstream to a header or the like.Accordingly, since the three-dimensional data decoding device canselectively decode the attribute information that needs to be decoded,the decoding processing of the attribute information that does not needto be decoded can be omitted. Therefore, the processing amount for thethree-dimensional data decoding device can be reduced. Additionally, thethree-dimensional data encoding device may encode a plurality of piecesof attribute information in parallel, and may integrate the encodingresults into one bitstream. Accordingly, the three-dimensional dataencoding device can encode a plurality of pieces of attributeinformation at high speed.

FIG. 35 is a flowchart of the attribute information encoding processing(S6603). First, the three-dimensional data encoding device generates acoding coefficient from attribute information by the Haar conversion(S6611). Next, the three-dimensional data encoding device appliesquantization to the coding coefficient (S6612). Next, thethree-dimensional data encoding device generates encoded attributeinformation (bitstream) by encoding the coding coefficient after thequantization (S6613).

Additionally, the three-dimensional data encoding device applies inversequantization to the coding coefficient after the quantization (S6614).Next, the three-dimensional decoding device decodes the attributeinformation by applying the inverse Haar conversion to the codingcoefficient after the inverse quantization (S6615). For example, thedecoded attribute information is referred to in the following encoding.

FIG. 36 is a flowchart of the coding coefficient encoding processing(S6613). First, the three-dimensional data encoding device converts acoding coefficient from a signed integer value to an unsigned integervalue (S6621). For example, the three-dimensional data encoding deviceconverts a signed integer value to an unsigned integer value as follows.When signed integer value Ta1q is smaller than 0, the unsigned integervalue is set to −1−(2×Ta1q). When the signed integer value Ta1q is equalto or more than 0, the unsigned integer value is set to 2×Ta1q. Notethat, when the coding coefficient does not become a negative value, thethree-dimensional data encoding device may encode the coding coefficientas the unsigned integer value as is.

When not all coding coefficients have been processed (No in S6622), thethree-dimensional data encoding device determines whether the value ofthe coding coefficient to be processed is zero (S6623). When the valueof the coding coefficient to be processed is zero (Yes in S6623), thethree-dimensional data encoding device increments ZeroCnt by 1 (S6624),and returns to step S6622.

When the value of the coding coefficient to be processed is not zero (Noin S6623), the three-dimensional data encoding device encodes ZeroCnt,and resets ZeroCnt to zero (S6625). Additionally, the three-dimensionaldata encoding device arithmetically encodes the coding coefficient to beprocessed (S6626), and returns to step S6622. For example, thethree-dimensional data encoding device performs binary arithmeticencoding. In addition, the three-dimensional data encoding device maysubtract the value 1 from the coding coefficient, and may encode theobtained value.

Additionally, the processing of steps S6623 to S6626 is repeatedlyperformed for each coding coefficient. In addition, when all the codingcoefficients have been processed (Yes in S6622), the three-dimensionaldata encoding device ends the processing.

FIG. 37 is a flowchart of the three-dimensional data decoding processingaccording to the present embodiment. First, the three-dimensionaldecoding device decodes geometry information (geometry) from a bitstream(S6631). For example, the three-dimensional data decoding deviceperforms decoding by using an octree representation.

Next, the three-dimensional decoding device decodes the attributeinformation from the bitstream (S6632). For example, when decoding aplurality of pieces of attribute information, the three-dimensionaldecoding device may decode the plurality of pieces of attributeinformation in order. For example, when decoding the color and thereflectance as the attribute information, the three-dimensional datadecoding device decodes the encoding result of the color and theencoding result of the reflectance according to the order in which theyare added to the bitstream. For example, when the encoding result of thereflectance is added after the encoding result of the color in abitstream, the three-dimensional data decoding device decodes theencoding result of the color, and thereafter decodes the encoding resultof the reflectance. Note that the three-dimensional data decoding devicemay decode the encoding results of the attribute information added to abitstream in any order.

Additionally, the three-dimensional decoding device may obtain theinformation indicating the start location of the encoded data of eachattribute information in a bitstream by decoding a header or the like.Accordingly, since the three-dimensional data decoding device canselectively decode the attribute information that needs to be decoded,the decoding processing of the attribute information that does not needto be decoded can be omitted. Therefore, the processing amount of thethree-dimensional decoding device can be reduced. Additionally, thethree-dimensional data decoding device may decode a plurality of piecesof attribute information in parallel, and may integrate the decodingresults into one three-dimensional point cloud. Accordingly, thethree-dimensional data decoding device can decode a plurality of piecesof attribute information at high speed.

FIG. 38 is a flowchart of the attribute information decoding processing(S6632). First, the three-dimensional decoding device decodes a codingcoefficient from a bitstream (S6641). Next, the three-dimensionaldecoding device applies the inverse quantization to the codingcoefficient (S6642). Next, the three-dimensional decoding device decodesthe attribute information by applying the inverse Haar conversion to thecoding coefficient after the inverse quantization (S6643).

FIG. 39 is a flowchart of the coding coefficient decoding processing(S6641). First, the three-dimensional decoding device decodes ZeroCntfrom a bitstream (S6651). When not all coding coefficients have beenprocessed (No in S6652), the three-dimensional decoding devicedetermines whether ZeroCnt is larger than 0 (S6653).

When ZeroCnt is larger than zero (Yes in S6653), the three-dimensionaldecoding device sets the coding coefficient to be processed to 0(S6654). Next, the three-dimensional decoding device subtracts 1 fromZeroCnt (S6655), and returns to step S6652.

When ZeroCnt is zero (No in S6653), the three-dimensional decodingdevice decodes the coding coefficient to be processed (S6656). Forexample, the three-dimensional decoding device uses binary arithmeticdecoding. Additionally, the three-dimensional decoding device may addthe value 1 to the decoded coding coefficient.

Next, the three-dimensional decoding device decodes ZeroCnt, sets theobtained value to ZeroCnt (S6657), and returns to step S6652.

Additionally, the processing of steps S6653 to S6657 is repeatedlyperformed for each coding coefficient. In addition, when all the codingcoefficients have been processed (Yes in S6652), the three-dimensionaldata encoding device converts a plurality of decoded coding coefficientsfrom unsigned integer values to signed integer values (S6658). Forexample, the three-dimensional data decoding device may convert thedecoded coding coefficients from unsigned integer values to signedinteger values as follows. When the LSB (least significant bit) of thedecoded unsigned integer value Ta1u is 1, the signed integer value Ta1qis set to −((Ta1u+1)>>1). When the LSB of the decoded unsigned integervalue Ta1u is not 1 (when it is 0), the signed integer value Ta1q is setto (Ta1u>>1). Note that, when the coding coefficient does not become anegative value, the three-dimensional data decoding device may use thedecoded coding coefficient as is as the signed integer value.

FIG. 40 is a block diagram of attribute information encoder 6600included in the three-dimensional data encoding device. Attributeinformation encoder 6600 includes sorter 6601, Haar transformer 6602,quantizer 6603, inverse quantizer 6604, inverse Haar converter 6605,memory 6606, and arithmetic encoder 6607.

Sorter 6601 generates the Morton codes by using the geometry informationof three-dimensional points, and sorts the plurality ofthree-dimensional points in the order of the Morton codes. Haartransformer 6602 generates the coding coefficient by applying the Haarconversion to the attribute information. Quantizer 6603 quantizes thecoding coefficient of the attribute information.

Inverse quantizer 6604 inverse quantizes the coding coefficient afterthe quantization. Inverse Haar converter 6605 applies the inverse Haarconversion to the coding coefficient. Memory 6606 stores the values ofpieces of attribute information of a plurality of decodedthree-dimensional points. For example, the attribute information of thedecoded three-dimensional points stored in memory 6606 may be utilizedfor prediction and the like of an unencoded three-dimensional point.

Arithmetic encoder 6607 calculates ZeroCnt from the coding coefficientafter the quantization, and arithmetically encodes ZeroCnt.Additionally, arithmetic encoder 6607 arithmetically encodes thenon-zero coding coefficient after the quantization. Arithmetic encoder6607 may binarize the coding coefficient before the arithmetic encoding.In addition, arithmetic encoder 6607 may generate and encode variouskinds of header information.

FIG. 41 is a block diagram of attribute information decoder 6610included in the three-dimensional decoding device. Attribute informationdecoder 6610 includes arithmetic decoder 6611, inverse quantizer 6612,inverse Haar converter 6613, and memory 6614.

Arithmetic decoder 6611 arithmetically decodes ZeroCnt and the codingcoefficient included in a bitstream. Note that arithmetic decoder 6611may decode various kinds of header information.

Inverse quantizer 6612 inverse quantizes the arithmetically decodedcoding coefficient. Inverse Haar converter 6613 applies the inverse Haarconversion to the coding coefficient after the inverse quantization.Memory 6614 stores the values of pieces of attribute information of aplurality of decoded three-dimensional points. For example, theattribute information of the decoded three-dimensional points stored inmemory 6614 may be utilized for prediction of an undecodedthree-dimensional point.

Note that, in the above-described embodiment, although the example hasbeen shown in which the three-dimensional points are encoded in theorder of the lower layers to the higher layers as the encoding order, itis not necessarily limit to this. For example, a method may be used thatscans the coding coefficients after the Haar conversion in the order ofthe higher layers to the lower layers. Note that, also in this case, thethree-dimensional data encoding device may encode the number ofconsecutive times of the value 0 as ZeroCnt.

Additionally, the three-dimensional data encoding device may switchwhether or not to use the encoding method using ZeroCnt described in thepresent embodiment per WLD, SPC, or volume. In this case, thethree-dimensional data encoding device may add the informationindicating whether or not the encoding method using ZeroCnt has beenapplied to the header information. Accordingly, the three-dimensionaldecoding device can appropriately perform decoding. As an example of theswitching method, for example, the three-dimensional data encodingdevice counts the number of times of occurrence of the codingcoefficient having a value of 0 with respect to one volume. When thecount value exceeds a predefined threshold value, the three-dimensionaldata encoding device applies the method using ZeroCnt to the nextvolume, and when the count value is equal to or less than the thresholdvalue, the three-dimensional data encoding device does not apply themethod using ZeroCnt to the next volume. Accordingly, since thethree-dimensional data encoding device can appropriately switch whetheror not to apply the encoding method using ZeroCnt according to thecharacteristic of a current three-dimensional point to be encoded, thecoding efficiency can be improved.

Hereinafter, another technique (modification) of the present embodimentwill be described. The three-dimensional data encoding device scans andencodes the coding coefficients (unsigned integer values) after thequantization according to a certain order. For example, thethree-dimensional data encoding device encodes a plurality ofthree-dimensional points from the three-dimensional points included inthe lower layers toward the higher layers in order.

FIG. 42 is a diagram showing an example of the first code sequence andthe second code sequence in the case where this technique is used forthe attribute information shown in FIG. 27 . In the case of thisexample, the three-dimensional data encoding device encodes a pluralityof coding coefficients in the order of Ta5q, Tb1q, Tb3q, Tc1q, and d0qfrom Ta1q included in the lower layer L. Here, there is a tendency thatthe lower the layer, the more likely it is that the coding coefficientafter quantization becomes 0. This can be due to the following and thelike.

Since the coding coefficients of the lower layers L show a higherfrequency component than the higher layers, the coding coefficients tendto be 0 depending on the current three-dimensional point to be encoded.Additionally, by switching the quantization scale according to theabove-described importance or the like. The lower the layer, the largerthe quantization scale, and the coding coefficient after thequantization easily become 0. In this manner, the lower the layer, themore likely it is that the coding coefficient after the quantizationbecomes 0, and the value 0 is likely to be consecutively generated forthe first code sequence. The three-dimensional data encoding devicecounts the number of times that the value 0 occurs in the first codesequence, and encodes the number of times (ZeroCnt) that the value 0consecutively occurs, instead of the consecutive values 0. Accordingly,when there are consecutive values 0 of the coding coefficients after thequantization, the coding efficiency can be improved by encoding thenumber of consecutive times of 0, rather than encoding a lot of 0s.

Additionally, the three-dimensional data encoding device may encode theinformation indicating the total number of times of occurrence of thevalue 0. Accordingly, the overhead of encoding ZeroCnt can be reduced,and the coding efficiency can be improved.

For example, the three-dimensional data encoding device encodes thetotal number of the coding coefficients having a value of 0 asTotalZeroCnt. Accordingly, in the example shown in FIG. 42 , at the timewhen the three-dimensional data decoding device decodes the secondZeroCnt (value 1) included in the second code sequence, the total numberof decoded ZeroCnts will be N+1 (=TotalZeroCnt). Therefore, thethree-dimensional data decoding device can identify that 0 does notoccur after this. Therefore, subsequently, it becomes unnecessary forthe three-dimensional data encoding device to encode ZeroCnt for eachvalue, and the code amount can be reduced. Additionally, thethree-dimensional data encoding device may entropy encode TotalZeroCnt.For example, the three-dimensional data encoding device binarizes thevalue of TotalZeroCnt with the truncated unary code of the total numberT of the encoded three-dimensional points, and arithmetically encodeseach bit after binarization. At this time, the three-dimensional dataencoding device may improve the coding efficiency by using a differentcoding table for each bit. For example, the three-dimensional dataencoding device uses coding table 1 for the first bit, uses coding table2 for the second bit, and coding table 3 for the subsequent bits. Inthis manner, the three-dimensional data encoding device can improve thecoding efficiency by switching the coding table for each bit.

Additionally, the three-dimensional data encoding device mayarithmetically encode TotalZeroCnt after binarizing TotalZeroCnt with anExponential-Golomb. Accordingly, when the value of TotalZeroCnt easilybecomes large, the efficiency can be more improved than the binarizedarithmetic encoding with the truncated unary code. Note that thethree-dimensional data encoding device may add a flag for switchingbetween using the truncated unary code and using the Exponential-Golombto a header. Accordingly, the three-dimensional data encoding device canimprove the coding efficiency by selecting the optimum binarizationmethod. Additionally, the three-dimensional data decoding device cancorrectly decode a bitstream by referring to the flag included in theheader to switch the binarization method.

FIG. 43 is a diagram showing a syntax example of the attributeinformation (attribute_data) in the present modification. The attributeinformation (attribute_data) shown in FIG. 43 further includes the totalnumber of zeros (TotalZeroCnt) in addition to the attribute informationshown in FIG. 32 . Note that the other information is the same as thatin FIG. 32 . The total number of zeros (TotalZeroCnt) indicates thetotal number of the coding coefficients having a value of 0 afterquantization.

Additionally, the three-dimensional data encoding device may switch thecalculation method of the values of TotalZeroCnt and ZeroCnt dependingon the value of attribute_dimension. For example, whenattribute_dimension=3, the three-dimensional data encoding device maycount the number of times that the values of the coding coefficients ofall the components (dimensions) become 0. FIG. 44 is a diagram showingan example of the coding coefficient, ZeroCnt, and TotalZeroCnt in thiscase. For example, in the case of the color information shown in FIG. 44, the three-dimensional data encoding device counts the number of theconsecutive coding coefficients having 0 for all of the R, G, and Bcomponents, and adds the counted number to a bitstream as TotalZeroCntand ZeroCnt. Accordingly, it becomes unnecessary to encode Total ZeroCntand ZeroCnt for each component, and the overhead can be reduced.Therefore, the coding efficiency can be improved. Note that thethree-dimensional data encoding device may calculate TotalZeroCnt andZeroCnt for each dimension even when attribute_dimension is two or more,and may add the calculated TotalZeroCnt and ZeroCnt to a bitstream.

FIG. 45 is a flowchart of the coding coefficient encoding processing(S6613) in the present modification. First, the three-dimensional dataencoding device converts the coding coefficient from a signed integervalue to an unsigned integer value (S6661). Next, the three-dimensionaldata encoding device encodes TotalZeroCnt (S6662).

When not all coding coefficients have been processed (No in S6663), thethree-dimensional data encoding device determines whether the value ofthe coding coefficient to be processed is zero (S6664). When the valueof the coding coefficient to be processed is zero (Yes in S6664), thethree-dimensional data encoding device increments ZeroCnt by 1 (S6665),and returns to step S6663.

When the value of the coding coefficient to be processed is not zero (Noin S6664), the three-dimensional data encoding device determines whetherTotalZeroCnt is larger than 0 (S6666). When TotalZeroCnt is larger than0 (Yes in S6666), the three-dimensional data encoding device encodesZeroCnt, and sets TotalZeroCnt to TotalZeroCnt−ZeroCnt (S6667).

After step S6667, or when TotalZeroCnt is 0 (No in S6666), thethree-dimensional data encoding device encodes the coding coefficient,resets ZeroCnt to 0 (S6668), and returns to step S6663. For example, thethree-dimensional data encoding device performs binary arithmeticencoding. Additionally, the three-dimensional data encoding device maysubtract the value 1 from the coding coefficient, and encode theobtained value.

Additionally, the processing of steps S6664 to S6668 is repeatedlyperformed for each coding coefficient. In addition, when all the codingcoefficients have been processed (Yes in S6663), the three-dimensionaldata encoding device ends processing.

FIG. 46 is a flowchart of the coding coefficient decoding processing(S6641) in the present modification. First, the three-dimensionaldecoding device decodes TotalZeroCnt from a bitstream (S6671). Next, thethree-dimensional decoding device decodes ZeroCnt from the bitstream,and sets TotalZeroCnt to TotalZeroCnt−ZeroCnt (S6672).

When not all coding coefficients have been processed (No in S6673), thethree-dimensional data encoding device determines whether ZeroCnt islarger than 0 (S6674).

When ZeroCnt is larger than zero (Yes in S6674), the three-dimensionaldata decoding device sets the coding coefficient to be processed to 0(S6675). Next, the three-dimensional data decoding device subtracts 1from ZeroCnt (S6676), and returns to step S6673.

When ZeroCnt is zero (No in S6674), the three-dimensional data decodingdevice decodes the coding coefficient to be processed (S6677). Forexample, the three-dimensional data decoding device uses binaryarithmetic decoding. Additionally, the three-dimensional data decodingdevice may add the value 1 to the decoded coding coefficient.

Next, the three-dimensional data decoding device determines whetherTotalZeroCnt is larger than 0 (S6678). When TotalZeroCnt is larger than0 (Yes in S6678), the three-dimensional data decoding device decodesZeroCnt, sets the obtained value to ZeroCnt, sets TotalZeroCnt toTotalZeroCnt−ZeroCnt (S6679), and returns to step S6673. Additionally,when TotalZeroCnt is 0 (No in S6678), the three-dimensional decodingdevice returns to step S6673.

Additionally, the processing of steps S6674 to S6679 is repeatedlyperformed for each coding coefficient. In addition, when all the codingcoefficients have been processed (Yes in S6673), the three-dimensionaldata encoding device converts the decoded coding coefficient from anunsigned integer value to a signed integer value (S6680).

FIG. 47 is a diagram showing another syntax example of the attributeinformation (attribute_data). The attribute information (attribute_data)shown in FIG. 47 includes value [j] [i]_greater_zero_flag, value [j][i]_greater_one_flag, and value [j] [i], instead of the codingcoefficient (value [j] [i]) shown in FIG. 32 . Note that the otherinformation is the same as that in FIG. 32 .

Value [j] [i]_greater_zero_flag indicates whether or not the value ofthe coding coefficient (value [j] [i]) is larger than 0. In other words,value [j] [i]_greater_zero_flag indicates whether or not the value ofthe coding coefficient (value [j] [i]) is 0.

For example, when the value of the coding coefficient is larger than 0,value [j] [i]_greater_zero_flag is set to the value 1, and when thevalue of the coding coefficient is 0, value [j] [i]_greater_zero_flag isset to the value 0. When the value of value [j] [i]_greater_zero_flag is0, the three-dimensional data encoding device need not add value [j] [i]to a bitstream. In this case, the three-dimensional decoding device maydetermine that the value of value [j] [i] is the value 0. Accordingly,the code amount can be reduced.

Value [j] [i]_greater_one_flag indicates whether or not the value of thecoding coefficient (value [j] [i]) is larger than 1 (is equal to orlarger than 2). In other words, value [j] [i]_greater_one_flag indicateswhether or not the value of the coding coefficient (value [j] [i]) is 1.

For example, when the value of the coding coefficient is larger than 1,value [j] [i]_greater_one_flag is set to the value 1. Otherwise (whenthe value of the coding coefficient is equal to or less than 1), value[j] [i]_greater_one_flag is set to the value 0. When the value of value[j] [i]_greater_one_flag is 0, the three-dimensional data encodingdevice need not add value [j] [i] to a bitstream. In this case, thethree-dimensional decoding device may determine that the value of value[j] [i] is the value 1.

Value [j] [i] indicates the coding coefficient after quantization of theattribute information of the j-th dimension of the i-ththree-dimensional point. For example, when the attribute information iscolor information, value [99] [1] indicates the coding coefficient ofthe second dimension (for example, the G value) of the 100ththree-dimensional point. Additionally, when the attribute information isreflectance information, value [119] [0] indicates the codingcoefficient of the first dimension (for example, the reflectance) of the120th three-dimensional point.

When value [j] [i]_greater_zero_flag=1, and value [j][i]_greater_one_flag=1, the three-dimensional data encoding device mayadd value [j] [i] to a bitstream. Additionally, the three-dimensionaldata encoding device may add the value obtained by subtracting 2 fromvalue [j] [i] to the bitstream. In this case, the three-dimensionaldecoding device calculates the coding coefficient by adding the value 2to the decoded value [j] [i].

The three-dimensional data encoding device may entropy encode value [j][i]_greater_zero_flag and value [j] [i]_greater_one_flag. For example,binary arithmetic encoding and binary arithmetic decoding may be used.Accordingly, the coding efficiency can be improved.

Embodiment 8

In this embodiment, a reversible (Lossless) attribute encoding will bedescribed. To achieve high compression, attribute information includedin Point Cloud Compression (PCC) data is transformed in a plurality ofmethods, such as Lifting, Region Adaptive Hierarchical Transform (RAHT)and other transform methods. Here, Lifting is one of transform methodsusing Level of Detail (LoD).

Important signal information tends to be included in a low-frequencycomponent, and therefore the code amount is reduced by quantizing ahigh-frequency component. That is, the transform process has strongenergy compression characteristics.

On the other hand, in order to maintain the original information whilereducing the number of bits, the reversible compression is needed.Existing transforms, such as Lifting and RAHT, involves a division and asquare-root operator and therefore cannot achieve reversiblecompression. In order to achieve an efficient and effective reversiblecompression, an integer-to-integer transform that is not complicated isneeded.

FIG. 48 is a diagram showing a configuration of a three-dimensional dataencoding device. As shown in FIG. 48 , the three-dimensional dataencoding device includes integer transformer 8301 and entropy encoder8302. Integer transformer 8301 generates a coefficient value byinteger-transforming input point cloud data. Entropy encoder 8302generates a bitstream by entropy-encoding the coefficient value.

FIG. 49 is a diagram showing a configuration of a three-dimensional datadecoding device. As shown in FIG. 49 , the three-dimensional datadecoding device includes entropy decoder 8303 and inverse integertransformer 8304. Entropy decoder 8303 obtains a coefficient value bydecoding a bitstream. Inverse integer transformer 8304 generates outputpoint cloud data by inverse integer-transforming the coefficient value.

In the following, RAHT will be describe. RAHT is an example of thetransform processings applied to three-dimensional points. FIG. 50 is adiagram for illustrating RAHT. m-th Low-frequency component L_(l, m) andm-th high-frequency component H_(l, m) in layer l are expressed by twolow-frequency components C_(l+1, 2m) and C_(l+1, 2m+1) in layer l+1according to the following (Equation O1). That is, low-frequencycomponent L_(l, m) is expressed by (Equation O2), and high-frequencycomponent H_(l, m) is expressed by (Equation O3).

A high-frequency component is encoded by quantization and entropyencoding. A low-frequency component is used in the subsequent layer asshown by (Equation O4). Coefficient α and β are updated for each upperlayer. Coefficients α and β are expressed by (Equation O5) and (EquationO6), respectively. Weight W_(l, m) is expressed by (Equation O7).

[Math. 2] $\begin{matrix}{\begin{bmatrix}L_{l,m} \\H_{l,m}\end{bmatrix} = {\begin{bmatrix}\alpha & \beta \\{- \beta} & \alpha\end{bmatrix}\begin{bmatrix}C_{{l + 1},{2m}} \\C_{{l + 1},{{2m} + 1}}\end{bmatrix}}} & \left( {{Equation}\mspace{14mu}{O1}} \right) \\{L_{l,m} = {{\alpha C}_{{l + 1},{2m}} + {\beta C}_{{l + 1},{{2m} + 1}}}} & \left( {{{Eq}{uation}}\mspace{14mu}{O2}} \right) \\{H_{l,m} = {{\alpha C}_{{l + 1},{{2m} + 1}} - {\beta C}_{{l + 1},{2m}}}} & \left( {{Equation}\mspace{14mu}{O3}} \right) \\{C_{l,m} = L_{l.m}} & \left( {{Equation}\mspace{14mu}{O4}} \right) \\{\alpha = \frac{\sqrt{w_{{l + 1},{2m}}}}{\sqrt{w_{{l + 1},{2m}} + w_{{l + 1},{{2m} + 1}}}}} & \left( {{Equation}\mspace{14mu}{O5}} \right) \\{\beta = \frac{\sqrt{w_{{l + 1},{{2m} + 1}}}}{\sqrt{w_{{l + 1},{2m}} + w_{{l + 1},{{2m} + 1}}}}} & \left( {{Equation}\mspace{14mu}{O6}} \right) \\{w_{l,m} = {w_{{l + 1},{2m}} + w_{{l + 1},{{2m} + 1}}}} & \left( {{Equation}\mspace{14mu}{O7}} \right)\end{matrix}$

Next, an integer-to-integer transform will be described. The RAHTprocess involves a square-root operator and a division. This means thatinformation is lost in RAHT, and RAHT cannot achieve reversiblecompression. On the other hand, the integer-to-integer transform canachieve reversible compression.

FIG. 51 is a diagram for illustrating an integer-to-integer transform.In the integer-to-integer transform, a fixed value is used as acoefficient in RAHT. For example, an unnormalized Haar transformexpressed by the following (Equation O8) is used. That is, low-frequencycomponent L_(l, m) is expressed by (Equation O9), and high-frequencycomponent H_(l, m) is expressed by (Equation O10).

A high-frequency component is encoded by quantization and entropyencoding. A low-frequency component is used in the subsequent layer asshown by (Equation O11).

[Math. 3] $\begin{matrix}{\begin{bmatrix}L_{l,m} \\H_{l,m}\end{bmatrix} = {\begin{bmatrix}\frac{1}{2} & \frac{1}{2} \\{- 1} & 1\end{bmatrix}\begin{bmatrix}C_{{l + 1},{2m}} \\C_{{l + 1},{{2m} + 1}}\end{bmatrix}}} & \left( {{Equation}\mspace{14mu}{O8}} \right) \\{L_{l,m} = {\left( {C_{{l + 1},{2m}} + C_{{l + 1},{{2m} + 1}}} \right)/2}} & \left( {{Equation}\mspace{14mu}{O9}} \right) \\{H_{l,m} = {C_{{l + 1},{{2m} + 1}} - C_{{l + 1},{2m}}}} & \left( {{Equation}\mspace{14mu}{O10}} \right) \\{C_{l,m} = L_{l,m}} & \left( {{Equation}{\mspace{11mu}\;}{O11}} \right)\end{matrix}$

The unnormalized Haar transform can be rewritten as (Equation O12) and(Equation O13).

[Math. 4] $\begin{matrix}{{H_{l,m} = {C_{{l + 1},{{2m} + 1}} - C_{{l + 1},{2m}}}}{L_{l,m} = \frac{C_{{l + 1},{2m}} + C_{{l + 1},{{2m} + 1}}}{2}}} & \left( {{Equation}\mspace{14mu}{O12}} \right) \\{\mspace{40mu}{= {C_{{l + 1},{2m}} + \frac{H_{l,m}}{2}}}} & \left( {{Equation}\mspace{14mu}{O13}} \right)\end{matrix}$

An integer Haar transform is achieved according to (Equation O14) and(Equation O15), and an inverse integer Haar transform is achievedaccording to (Equation O16) and (Equation O17). Here, | | represents afloor function. Since both (Equation O15) and (Equation O16) includes|H_(l, m)/2|, a loss caused by |H_(l, m)/2| is cancelled by the integerHaar transform and the inverse integer Haar transform. In this way,reversible compression is achieved. Here, C_(i, j) is defined as aninteger, and therefore, H_(i, j) and L_(i, j) are also integers.[Math. 5]H _(l,m) =C _(l+1,2m+1) −C _(l+1,2m)  (Equation O14)L _(l,m) =C _(l+1,2m) +└H _(l,m)/2┘  (Equation O15)C _(l+1,2m) =L _(l,m) −┌H _(l,m)/2┘  (Equation O16)C _(l+1,2m+1) =H _(l,m) +C _(l+1,2m)  (Equation O17)

Therefore, an efficient implementation can be achieved by the following(Equation O18) to (Equation O21). That is, a transform can be achievedby one addition, one subtraction, and one right shifting (downshifting).[Math. 6]H _(l,m) =C _(l+1,2m+1) −C _(l+1,2m)  (Equation O18)L _(l,m) =C _(l+1,2m)+(H _(l,m)>>1)  (Equation O19)C _(l+1,2m) =L _(l,m)−(H _(l,m)>>1)  (Equation O20)C _(l+1,2m+1) =H _(l,m) +C _(l+1,2m)  (Equation O21)

A recursive integer-to-integer transform will be described. FIG. 52 is adiagram for illustrating a hierarchical transform processing. When theHaar transform is applied to an image, a pair of pieces of data isrequired in order to perform a transform suitable for pixel transform.In the Haar transform for a three-dimensional point cloud, an integerHaar is applied when a three-dimensional point pair, which is a pair ofpoint clouds, can be formed, and data on three-dimensional points ismoved to the subsequent layer (level) when a three-dimensional pointpair is not available. Then, this process is recursively performed.

Next, a configuration of a three-dimensional data encoding device willbe described. FIG. 53 is a block diagram of three-dimensional dataencoding device 8310. Three-dimensional data encoding device 8310generates encoded data (encoded stream) by encoding point cloud data(point cloud). Three-dimensional data encoding device 8310 includesgeometry information encoder 8311, lossless attribute informationencoder 8312, additional information encoder 8313, and multiplexer 8314.

Geometry information encoder 8311 generates encoded geometry informationby encoding geometry information. For example, geometry informationencoder 8311 encodes geometry information using an N-ary tree structure,such as an octree. Specifically, in the case of an octree, a currentspace is divided into eight nodes (subspaces), and 8-bit information(occupancy code) that indicates whether each node includes a point cloudor not is generated. A node including a point cloud is further dividedinto eight nodes, and 8-bit information that indicates whether each ofthe eight nodes includes a point cloud or not is generated. This processis repeated until a predetermined layer is reached or the number of thepoint clouds included in each node becomes smaller than or equal to athreshold.

Lossless attribute information encoder 8312 generates encoded attributeinformation, which is encoded data, by encoding attribute informationusing configuration information generated by geometry informationencoder 8311.

Additional information encoder 8313 generates encoded additionalinformation by encoding additional information included in point clouddata.

Multiplexer 8314 generates encoded data (encoded stream) by multiplexingthe encoded geometry information, the encoded attribute information, andthe encoded additional information, and transmits the generated encodeddata. The encoded additional information is used in the decoding.

FIG. 54 is a block diagram of lossless attribute information encoder8312. Lossless attribute information encoder 8312 includes integertransformer 8321 and entropy encoder 8322. Integer transformer 8321generates a coefficient value by performing an integer transform (suchas an integer Haar transform) on attribute information. Entropy encoder8322 generates encoded attribute information by entropy-encoding thecoefficient value.

FIG. 55 is a block diagram of integer transformer 8321. Integertransformer 8321 includes re-ordering unit 8323 and integer Haartransformer 8324. Re-ordering unit 8323 re-orders attribute informationbased on geometry information. For example, re-ordering unit 8323re-orders attribute information in Morton order. Integer Haartransformer 8324 generates a coefficient value by performing an integerHaar transform on the re-ordered attribute information.

Next, a configuration of a three-dimensional data decoding deviceaccording to this embodiment will be described. FIG. 56 is a blockdiagram showing a configuration of three-dimensional data decodingdevice 8330. Three-dimensional data decoding device 8330 reproducespoint cloud data by decoding encoded data (encoded stream) generated byencoding the point cloud data. Three-dimensional data decoding device8330 includes demultiplexer 8331, a plurality of geometry informationdecoders 8332, a plurality of lossless attribute information decoders8333, and additional information decoder 8334.

Demultiplexer 8331 generates encoded geometry information, encodedattribute information, and encoded additional information bydemultiplexing encoded data (encoded stream).

Geometry information decoder 8332 generates geometry information bydecoding encoded geometry information. Lossless attribute informationdecoder 8333 generates attribute information by decoding encodedattribute information. For example, lossless attribute informationdecoder 8333 generates attribute information by performing an inverseinteger transform (such as an inverse integer Haar transform) on encodedattribute information. FIG. 57 is a block diagram of lossless attributeinformation decoder 8333. Lossless attribute information decoder 8333includes entropy decoder 8341 and inverse integer transformer 8342.Entropy decoder 8341 generates a coefficient value by entropy-decodingencoded attribute information. Inverse integer transformer 8342generates attribute information by performing an inverse integertransform (such as an inverse integer Haar transform) on the coefficientvalue.

FIG. 58 is a block diagram of inverse integer transformer 8342. Inverseinteger transformer 8342 includes re-ordering unit 8343 and inverseinteger Haar transformer 8344. Re-ordering unit 8343 re-orderscoefficient values based on geometry information. For example,re-ordering unit 8343 re-orders coefficient values in Morton order.Inverse integer Haar transformer 8344 generates attribute information byperforming an inverse integer Haar transform on the re-orderedcoefficient values.

The three-dimensional data encoding device may add, to the header of thebitstream or the like, information that indicates which of thereversible (Lossless) encoding and the irreversible (lossy) encoding hasbeen used. For example, the three-dimensional data encoding device mayadd lossless_enable_flag to the header. When lossless_enable_flag=1, thethree-dimensional data decoding device decodes the reversibly encodedbitstream by applying the inverse integer Haar transform. Whenlossless_enable_flag=0, the three-dimensional data decoding devicedecodes the irreversibly encoded bitstream by applying the inverse RAHT.In this way, the three-dimensional data decoding device can properlydecode the bitstream by changing the inverse transform processing inaccordance with the value of lossless_enable_flag.

Note that the information that indicates which of the reversibleencoding and the irreversible encoding has been used for encoding is notnecessarily limited thereto, and the value of quantization parameter QPor quantization step Qstep can also be used, for example. For example,when the value of the quantization parameter or quantization step is aparticular value (QP=4 or Qstep=1, for example), the three-dimensionaldata decoding device may determine that the bitstream has been encodedby reversible encoding, and decode the reversibly encoded bitstream byapplying the inverse integer Haar transform. When the value of thequantization parameter or quantization step is greater than theparticular value (QP=4 or Qstep=1, for example), the three-dimensionaldata decoding device may determine that the bitstream has been encodedby irreversible encoding, and decode the irreversibly encoded bitstreamby applying the inverse RAHT.

Next, a lossless attribute information encoding processing will bedescribed. FIG. 59 is a flowchart of a lossless attribute informationencoding processing.

First, the three-dimensional data encoding device re-orders attributeinformation on a three-dimensional point cloud (S8301). For example, thethree-dimensional data encoding device re-orders attribute informationon a three-dimensional point cloud in Morton order.

The three-dimensional data encoding device then selects a current pointto be processed from the three-dimensional point cloud (S8302).Specifically, the three-dimensional data encoding device selects theleading three-dimensional point in the three-dimensional point cloudre-ordered in Morton order.

The three-dimensional data encoding device then determines whether ornot there is a three-dimensional point pair (Point Pair), which athree-dimensional point located next to the current three-dimensionalpoint in Morton order (S8303). When there is a three-dimensional pointpair (if Yes in S8304), the three-dimensional data encoding devicegenerates a coefficient value including a high-frequency component and alow-frequency component by performing the integer Haar transform usingthe three-dimensional point pair (S8305). The three-dimensional dataencoding device then encodes (entropy-encodes, for example) thegenerated high-frequency component, and stores the encodedhigh-frequency component in the bitstream (S8306). The three-dimensionaldata encoding device also stores the low-frequency component in a memoryor the like for the processing for the subsequent layer (S8307).

On the other hand, when there is no three-dimensional point pair if Noin S8304), the three-dimensional data encoding device stores theattribute information on the current three-dimensional point in thememory or the like for the subsequent layer (S8307).

When the current three-dimensional point is not the lastthree-dimensional point in the current layer, which is the layer to beprocessed (if No in S8308), the three-dimensional data encoding deviceselects the subsequent three-dimensional point in Morton order as acurrent three-dimensional point (S8302), and performs step S8303 and thefollowing process on the selected current three-dimensional point. The“subsequent three-dimensional point in Morton order” means thethree-dimensional point subsequent to the three-dimensional point pairwhen there is a three-dimensional point pair, and refers to thethree-dimensional point subsequent to the current three-dimensionalpoint when there is no three-dimensional point pair.

When the current three-dimensional point is the last three-dimensionalpoint in the current layer of Yes in S8308), the three-dimensional dataencoding device starts the processing for the subsequent layer (thelayer directly above the current layer) (S8309). When the former currentlayer is not the last layer (top layer) (if No in S8310), thethree-dimensional data encoding device selects the firstthree-dimensional point in Morton order in the subsequent layer as acurrent three-dimensional point (S8302), and performs step S8303 and thefollowing process on the selected current three-dimensional point.

When the former current layer is the last layer of Yes in S8310), thethree-dimensional data encoding device encodes (entropy-encodes, forexample) the low-frequency component generated in the last layer (toplayer), and stores the encoded low-frequency component in the bitstream(S8311). By the process described above, encoded attribute informationis generated which includes the encoded high-frequency component for thethree-dimensional point pair included in each layer and the encodedlow-frequency component for the top layer.

Next, a lossless attribute information decoding processing will bedescribed. FIG. 60 is a flowchart of a lossless attribute informationdecoding processing.

First, the three-dimensional data decoding device decodes coefficientvalues from the bitstream (S8321). The coefficient value includes thehigh-frequency component for the three-dimensional point pair includedin each layer and the low-frequency component for the top layer. Thethree-dimensional data decoding device then re-orders the obtainedcoefficient values (S8322). For example, the three-dimensional datadecoding device re-orders a plurality of high-frequency components inMorton order.

The three-dimensional data decoding device then obtains a low-frequencycomponent to be processed and a high-frequency component to beprocessed, which are the low-frequency component and the high-frequencycomponent of the three-dimensional point pair to be processed (S8323 andS8324). Specifically, the low-frequency component to be processed forthe top layer is the low-frequency component decoded from the bitstream,and the low-frequency component to be processed for the layers otherthan the top layer is the low-frequency component obtained by theinverse transform processing in the layer directly above the layer. Thehigh-frequency component to be processed for the top layer is theleading high-frequency component of the high-frequency componentsre-ordered in Morton order. Note that, when there is nothree-dimensional point pair, there is no high-frequency component to beprocessed.

When there is a three-dimensional point pair (if Yes in S8325), that is,when there is a high-frequency component to be processed, thethree-dimensional data decoding device generates a low-frequencycomponent for the layer directly below the layer by performing theinverse integer Haar transform using the low-frequency component to beprocessed and the high-frequency component to be processed (S8326). Notethat, when the current layer is the bottom layer, attribute informationis generated by the inverse integer Haar transform.

The three-dimensional data decoding device stores the generatedlow-frequency component in a memory or the like for the processing forthe subsequent layer (S8327).

On the other hand, when there is no three-dimensional point pair if Noin S8325), the three-dimensional data decoding device stores thelow-frequency component to be processed in the memory or the like forthe subsequent layer (S8327).

When the coefficient value (three-dimensional point pair) to beprocessed is not the last coefficient value in the current layer (if Noin S8328), the three-dimensional data decoding device selects thesubsequent three-dimensional point pair in Morton order as athree-dimensional point to be processed, and performs step S8323 and thefollowing process on the selected three-dimensional point pair.

When the coefficient value to be processed is the last coefficient valuein the current layer (if Yes in S8328), the three-dimensional datadecoding device starts the processing for the subsequent layer (thelayer directly below the layer) (S8329). When the former current layeris not the last layer (bottom layer) (if No in S8330), thethree-dimensional data decoding device selects the firstthree-dimensional point pair in Morton order in the subsequent layer asa three-dimensional point pair to be processed, and performs step S8323and the following process on the selected three-dimensional point pair.

When the former current layer is the last layer of Yes in S8330), thethree-dimensional data decoding device ends the processing. By theprocessing described above, the attribute information on all thethree-dimensional points is obtained.

Next, example configurations of integer Haar transformer 8324 andinverse integer Haar transformer 8344 will be described. FIG. 61 is adiagram showing an example configuration of integer Haar transformer8324. As shown in FIG. 61 , integer Haar transformer 8324 includessubtractor 8351, right shifter 8352, and adder 8353. Here, C₁ and C₂represent attribute information on a three-dimensional point pair forthe bottom layer, and represent low-frequency components of athree-dimensional point pair obtained in the layer directly below thelayer for a layer other than the bottom layer. H represents ahigh-frequency component of a three-dimensional point pair, and Lrepresents a low-frequency component of a three-dimensional point pair.With the configuration in the drawing, the calculations expressed by(Equation O18) and (Equation O19) are implemented.

FIG. 62 is a diagram showing an example configuration of inverse integerHaar transformer 8344. As shown in FIG. 62 , inverse integer Haartransformer 8344 includes right shifter 8354, subtractor 8355, and adder8356. With the configuration in the drawing, the calculations expressedby (Equation O20) and (Equation O21) are implemented.

Note that, in at least any one of the forward transform and the inversetransform, input data may be divided into a plurality of pieces of dataon a predetermined unit basis, and the resulting divisional data may beprocessed in parallel. In this way, the processing speed can beincreased.

Next, an example where the encoding is switched between the reversibleencoding (integer Haar transform) and the irreversible encoding (RAHT)will be described. FIG. 63 is a diagram showing a configuration of athree-dimensional data encoding device in this case. Thethree-dimensional data encoding device selectively performs thereversible encoding (reversible compression) or the irreversibleencoding (irreversible compression). The three-dimensional data encodingdevice may indicate the encoding mode with a flag or QP.

The three-dimensional data encoding device shown in FIG. 63 includesre-ordering unit 8361, switcher 8362, RAHT unit 8363, quantizer 8364,integer transformer 8365, and entropy encoder 8366.

Re-ordering unit 8361 re-orders attribute information in Morton order,for example, based on geometry information. Switcher 8362 outputs there-ordered attribute information to RAHT unit 8363 or integertransformer 8365. For example, switcher 8362 switches between using theRAHT and using the integer Haar transform based on LOSSLESS_FLAG. Here,LOSSLESS_FLAG is a flag that indicates which of RAHT (irreversibleencoding) and the integer Haar transform (reversible encoding) is to beused. The integer Haar transform (reversible encoding) is used whenLOSSLESS_FLAG is on (a value of 1, for example), and RAHT (irreversibleencoding) is used when LOSSLESS_FLAG is off (a value of 0, for example).

Alternatively, the three-dimensional data encoding device may determineto use the reversible encoding when the value of quantization parameterQP is particular value a. Here, value α is a value with which thequantized value or the value of quantization step Qstep calculated fromthe QP value is 1. For example, if Qstep=1 when QP=4, α=4.

The switching between RAHT and the integer Haar transform is notexclusively performed based on LOSSLESS_FLAG or QP value, but can beperformed in any manner. For example, the three-dimensional dataencoding device may add an Enable_Integer_Haar_Transform flag to theheader or the like, and applies the integer Haar transform whenEnable_Integer_Haar_Transform=1, and apply RAHT whenEnable_Integer_Haar_Transform=0.

RAHT unit 8363 generates a coefficient value by applying RAHT to theattribute information. Quantizer 8364 generates a quantized coefficientby quantizing the coefficient value. integer transformer 8365 generatesa coefficient value by applying the integer Haar transform on theattribute information. Entropy encoder 8366 generates encoded attributeinformation by entropy-encoding the quantized value generated byquantizer 8364 or the coefficient value generated by integer transformer8365.

FIG. 64 is a diagram showing a configuration of a three-dimensional datadecoding device corresponding to the three-dimensional data encodingdevice shown in FIG. 63 . The three-dimensional data decoding deviceshown in FIG. 64 includes entropy decoder 8371, re-ordering unit 8372,switcher 8373, inverse quantizer 8374, inverse RAHT unit 8375, andinverse integer transformer 8376.

Entropy decoder 8371 generates coefficient values (or quantizedcoefficients) by entropy-decoding encoded attribute information.Re-ordering unit 8372 re-orders the coefficient values in Morton order,for example, based on geometry information. Switcher 8373 outputs there-ordered coefficient values to inverse quantizer 8374 or inverseinteger transformer 8376. For example, switcher 8373 switches betweenusing RAHT and using the integer Haar transform based on LOSSLESS_FLAG.Note that the way of switching by switcher 8373 is the same as the wayof switching by switcher 8362 described above. Note that thethree-dimensional data decoding device obtains LOSSLESS_FLAG, the QPvalue, or the Enable_Integer_Haar_Transform flag from the bitstream.

Inverse quantizer 8374 generates a coefficient value byinverse-quantizing the quantized coefficient. Inverse RAHT unit 8375generates attribute information by applying inverse RAHT on thecoefficient value. Inverse integer transformer 8376 generates attributeinformation by applying the inverse integer Haar transform on thecoefficient value.

Note that, although no quantization processing is performed when theinteger Haar transform is applied in the example shown in FIG. 63 andFIG. 64 , a quantization processing may be performed when the integerHaar transform is applied. FIG. 65 is a diagram showing a configurationof a three-dimensional data encoding device in that case. FIG. 66 is adiagram showing a configuration of a three-dimensional data decodingdevice in that case.

As shown in FIG. 65 , quantizer 8364A generates quantized coefficientsby quantizing the coefficient value generated by RAHT unit 8363 and thecoefficient value generated by integer transformer 8365.

As shown in FIG. 66 , inverse quantizer 8374A generates coefficientvalues by inverse-quantizing the quantized coefficients.

FIG. 67 and FIG. 68 are diagrams showing example configurations of thebitstream (encoded attribute information) generated by thethree-dimensional data encoding device. For example, as shown in FIG. 67, LOSSLESS_FLAG is stored in the header of the bitstream. Alternatively,as shown in FIG. 68 , the QP value is included in the header of thebitstream. The reversible encoding is applied when the QP value ispredetermined value α.

Embodiment 9

In this embodiment, an integer RAHT, which is an irreversible transformcloser to the reversible transform than the normal RAHT, will bedescribed. In order to facilitate the implementation of the hardware, afixed point RAHT can be introduced. The fixed point RAHT can beimplemented according to the following (Equation O22) and (EquationO23). Here, l represents a low-frequency component, and h represents ahigh-frequency component. c₁ and c₂ represent attribute information on athree-dimensional point pair for the bottom layer, and representlow-frequency components of a three-dimensional point pair obtained inthe layer directly below the layer for a layer other than the bottomlayer. The transform is orthonormal, and (Equation O24) holds.

[Math. 7] $\begin{matrix}{\begin{bmatrix}l \\h\end{bmatrix} = {\begin{bmatrix}a & b \\{- b} & a\end{bmatrix}\begin{bmatrix}c_{1} \\c_{2}\end{bmatrix}}} & \left( {{Equation}\mspace{14mu}{O22}} \right) \\{{a = \frac{\sqrt{w_{1}}}{\sqrt{w_{1} + w_{2}}}},\mspace{11mu}{b = \frac{\sqrt{w_{1}}}{\sqrt{w_{1} + w_{2}}}}} & \left( {{Equation}\mspace{14mu}{O23}} \right) \\{{a^{2} + b^{2}} = {{\frac{w_{1}}{w_{1} + w_{2}} + \frac{w_{2}}{w_{1} + w_{2}}} = 1}} & \left( {{Equation}\mspace{14mu}{O24}} \right)\end{matrix}$

Weight w after the update is expressed as w=w₁+w₂ when c₁ and c₂ are athree-dimensional point pair, and is expressed as w=w₁ when c₁ and c₂are not a pair.

The above (Equation O22) is transformed into the following (EquationO25) to (Equation O29).

[Math. 8] $\begin{matrix}{\begin{bmatrix}l \\h\end{bmatrix} = {\begin{bmatrix}\frac{\sqrt{w_{1}}}{\sqrt{w_{1} + w_{2}}} & \frac{\sqrt{w_{2}}}{\sqrt{w_{1} + w_{2}}} \\{- \frac{\sqrt{w_{2}}}{\sqrt{w_{1} + w_{2}}}} & \frac{\sqrt{w_{1}}}{\sqrt{w_{1} + w_{2}}}\end{bmatrix}\begin{bmatrix}c_{1} \\c_{2}\end{bmatrix}}} & \left( {{Equation}\mspace{14mu}{O25}} \right) \\{\begin{bmatrix}\frac{l}{\sqrt{w_{1} + w_{2}}} \\h\end{bmatrix} = {\begin{bmatrix}\frac{w_{1}}{w_{1} + w_{2}} & \frac{w_{2}}{w_{1} + w_{2}} \\{- \frac{\sqrt{w_{1}}\sqrt{w_{2}}}{\sqrt{w_{1} + w_{2}}}} & \frac{\sqrt{w_{1}}\sqrt{w_{2}}}{\sqrt{w_{1} + w_{2}}}\end{bmatrix}\begin{bmatrix}\frac{c_{1}}{\sqrt{w_{1}}} \\\frac{c_{2}}{\sqrt{w_{2}}}\end{bmatrix}}} & \left( {{Equation}\mspace{14mu}{O26}} \right) \\{\begin{bmatrix}\frac{l}{\sqrt{w_{1} + w_{2}}} \\\frac{h\sqrt{w_{1} + w_{2}}}{\sqrt{w_{1}w_{2}}}\end{bmatrix} = {\begin{bmatrix}\frac{w_{1}}{w_{1} + w_{2}} & \frac{w_{2}}{w_{1} + w_{2}} \\{- 1} & 1\end{bmatrix}\begin{bmatrix}\frac{c_{1}}{\sqrt{w_{1}}} \\\frac{c_{2}}{\sqrt{w_{2}}}\end{bmatrix}}} & \left( {{Equation}\mspace{14mu}{O27}} \right) \\{\begin{bmatrix}l^{\prime} \\h^{\prime}\end{bmatrix} = {\begin{bmatrix}a^{2} & b^{2} \\{- 1} & 1\end{bmatrix}\begin{bmatrix}c_{1}^{\prime} \\c_{2}^{\prime}\end{bmatrix}}} & \left( {{Equation}{\mspace{11mu}\;}{O28}} \right) \\{{l^{\prime} = \frac{l}{\sqrt{w_{1} + w_{2}}}},\mspace{14mu}{h^{\prime} = \frac{h\sqrt{w_{1} + w_{2}}}{\sqrt{w_{1}w_{2}}}}} & \left( {{Equation}{\mspace{11mu}\;}{O29}} \right)\end{matrix}$

Therefore, the forward transform is expressed by (Equation O30) to(Equation O32).

[Math. 9] $\begin{matrix}{\begin{bmatrix}l^{\prime} \\h^{\prime}\end{bmatrix} = {\begin{bmatrix}a^{2} & b^{2} \\{- 1} & 1\end{bmatrix}\begin{bmatrix}c_{1}^{\prime} \\c_{2}^{\prime}\end{bmatrix}}} & \left( {{Equation}\mspace{14mu}{O30}} \right) \\{h^{\prime} = {c_{2}^{\prime} - c_{1}^{\prime}}} & \left( {{Equation}\mspace{14mu}{O31}} \right) \\{l^{\prime} = {{{a^{2}c_{1}^{\prime}} + {b^{2}c_{2}^{\prime}}} = {c_{1}^{\prime} + {b^{2}h^{\prime}}}}} & \left( {{Equation}\mspace{14mu}{O32}} \right)\end{matrix}$

The inverse transform is expressed by (Equation O33) to (Equation O34).[Math. 10]c ₁ ′=l′−b ² h′  (Equation O33)c ₂ ′=h′+c ₁′  (Equation O34)

An adjusted quantization step (Aqs: Adjusted Quantization Step) isexpressed by (Equation O36) based on (Equation O35). Therefore,(Equation O37) holds. In this way, the integer RAHT can be implementedby fixed point implementation of b².

[Math. 11] $\begin{matrix}{h^{\prime} = \frac{h\sqrt{w_{1} + w_{2}}}{\sqrt{w_{1}w_{2}}}} & \left( {{Equation}\mspace{14mu}{O35}} \right) \\{{Aqs} = \frac{{QS}\sqrt{w_{1} + w_{2}}}{\sqrt{w_{1}w_{2}}}} & \left( {{Equation}\mspace{14mu}{O36}} \right) \\{\frac{h^{\prime}}{Aqs} = \frac{h}{QS}} & \left( {{Equation}\mspace{14mu}{O37}} \right)\end{matrix}$

In the following, a relationship between the integer RAHT and theinteger Haar transform will be described. The integer RAHT and theinteger Haar transform can be implemented by a common processing.Specifically, the integer Haar transform can be implemented by settingthe weights for all the layers in RAHT so that w₁=w₂=1.

That is, the forward transform in the integer RAHT is expressed by(Equation O38) to (Equation O40), and the inverse transform is expressedby (Equation O41) to (Equation O42). In addition, (Equation O43) holds.

[Math. 12] $\begin{matrix}{\begin{bmatrix}l^{\prime} \\h^{\prime}\end{bmatrix} = {\begin{bmatrix}a^{2} & b^{2} \\{- 1} & 1\end{bmatrix}\begin{bmatrix}c_{1}^{\prime} \\c_{2}^{\prime}\end{bmatrix}}} & \left( {{Equation}\mspace{14mu}{O38}} \right) \\{h^{\prime} = {c_{2}^{\prime} - c_{1}^{\prime}}} & \left( {{Equation}\mspace{14mu}{O39}} \right) \\{l^{\prime} = {c_{1}^{\prime} + {b^{2}h^{\prime}}}} & \left( {{Equation}\mspace{14mu}{O40}} \right) \\{c_{1}^{\prime} = {l^{\prime} - {b^{2}h^{\prime}}}} & \left( {{Equation}{\mspace{11mu}\;}{O41}} \right) \\{c_{2}^{\prime} = {h^{\prime} + c_{1}^{\prime}}} & \left( {{Equation}{\mspace{11mu}\;}{O42}} \right) \\{{a^{2} = \frac{w_{1}}{w_{1} + w_{2}}},\mspace{14mu}{b^{2} = \frac{w_{2}}{w_{1} + w_{2}}}} & \left( {{Equation}{\mspace{11mu}\;}{O43}} \right)\end{matrix}$

In (Equation O38) to (Equation O43), if the weight is set so thatw₁=w₂=1, the forward transform is expressed by (Equation O44) to(Equation O45), and the inverse transform is expressed by (Equation O46)to (Equation O47). That is, the integer Haar transform is implemented.[Math. 13]h′=c ₂ ′−c ₁′  (Equation O44)l′=c ₁ ′+h′/2  (Equation O45)c ₁ ′=l′−h′/2  (Equation O46)=c ₂ ′=h′+c ₁′  (Equation O47)

Next, an example will be described in which switching occurs between theirreversible encoding (RAHT), the irreversible encoding (integer RAHT)close to the reversible encoding, and the reversible encoding (integerHaar transform). FIG. 69 is a diagram showing a configuration of athree-dimensional data encoding device in this case. Thethree-dimensional data encoding device selectively performs theirreversible encoding (RAHT), the irreversible encoding (integer RAHT)close to the reversible encoding, or the reversible encoding (integerHaar transform). The switching is performed based on a flag or a QPvalue.

The three-dimensional data encoding device shown in FIG. 69 includesre-ordering unit 8401, integer RAHT/Haar transformer 8402, quantizer8403, and entropy encoder 8404.

Re-ordering unit 8401 re-orders attribute information in Morton order,for example, based on geometry information. Integer RAHT/Haartransformer 8402 generates a coefficient value by transforming theattribute information by selectively using the irreversible encoding(RAHT), the irreversible encoding (integer RAHT) close to the reversibleencoding, or the reversible encoding (integer Haar transform).

Specifically, the three-dimensional data encoding device uses thereversible encoding (integer Haar transform) when the value ofquantization parameter QP is particular value α, andRAHT-HAAR_FLAG=HAAR. Here, value α is a value with which the quantizedvalue or the value of quantization step Qstep calculated from the QPvalue is 1. For example, if Qstep=1 when QP=4, α=4. Alternatively, thevalue of α may be different between RAHT and Haar.

For example, when RAHT-HAAR_FLAG=RAHT, and QP is greater than α, theirreversible encoding (RAHT) is used. When RAHT-HAAR_FLAG=RAHT, andQP=α, the irreversible encoding (integer RAHT) close to the reversibleencoding is used. When RAHT-HAAR_FLAG=HAAR, and QP=α, the reversibleencoding (integer Haar transform) is used. When RAHT-HAAR_FLAG=HAAR, andQP is greater than a, the irreversible encoding (RAHT) may be used.

When RAHT-HAAR_FLAG=HAAR, integer RAHT/Haar transformer 8402 performsthe Haar transform by setting w₁=w₂=1.

Quantizer 8403 generates a quantized coefficient by quantizing thecoefficient value using QP. Entropy encoder 8404 generates encodedattribute information by entropy-encoding the quantized coefficient.

FIG. 70 is a diagram showing a configuration of a three-dimensional datadecoding device corresponding to the three-dimensional data encodingdevice shown in FIG. 69 . The three-dimensional data decoding deviceshown in FIG. 70 includes entropy decoder 8411, inverse quantizer 8412,re-ordering unit 8413, and inverse integer RAHT/Haar transformer 8414.

Entropy decoder 8411 generates quantized coefficients byentropy-decoding encoded attribute information. Inverse quantizer 8412generates coefficient values by inverse-quantizing the quantizedcoefficients using QP. Re-ordering unit 8413 re-orders the coefficientvalues in Morton order, for example, based on geometry information.

Inverse integer RAHT/Haar transformer 8414 generates attributeinformation by inverse-transforming the coefficient values byselectively using the irreversible encoding (RAHT), the irreversibleencoding (integer RAHT) close to the reversible encoding, or thereversible encoding (integer Haar transform). Note that the way ofswitching is the same as the way of switching by integer RAHT/Haartransformer 8402 described above. Note that the three-dimensional datadecoding device obtains LOSSLESS_FLAG and the QP value from thebitstream.

FIG. 71 is a diagram showing an example configuration of the bitstream(encoded attribute information) generated by the three-dimensional dataencoding device. For example, as shown in FIG. 71 , RAHT-HAAR_FLAG andthe QP value are stored in the header of the bitstream. RAHT-HAAR_FLAGis a flag that indicates which of the irreversible encoding (RAHT), theirreversible encoding (integer RAHT) close to the reversible encoding,and the reversible encoding (integer Haar transform) is to be used. Notethat RAHT-HAAR_FLAG may indicate which of the reversible encoding(integer Haar transform) and the irreversible encoding (RAHT) or theirreversible encoding (integer RAHT) close to the reversible encoding isto be used.

In the following, an example implementation of a configuration forperforming the integer RAHT will be described. The integer RAHT can beimplemented as described below. B represents the integer accuracy of b²,and is expressed by (Equation O48).

[Math. 14] $\begin{matrix}{B = \frac{\left( {w_{2} ⪡ {kBit}} \right)}{w_{1} + w_{2}}} & \left( {{Equation}\mspace{14mu}{O48}} \right)\end{matrix}$

kBit represents the accuracy of B. For example, in the case of 8-bitaccuracy, kBit=8. kHalf=(1<<(kBit−1)) represents the accuracy thatsupports a rounding (such as rounding down or rounding off). Theadjusted quantization step (Aqs) can be implemented by (Equation O49).

[Math. 15] $\begin{matrix}{{Aqs} = {{{sqrt}{\_ integer}}\left( \frac{{QS}*{QS}*\left( {w_{1} + w_{2}} \right)}{w_{1}*w_{2}} \right)}} & \left( {{Equation}\mspace{14mu}{O49}} \right)\end{matrix}$

Here, QS represents a quantization step (Quantization Step). The forwardtransform is expressed by (Equation O50) to (Equation O51).[Math. 16]h′=c ₂ ′−c ₁′  (Equation O50)l′=c ₁′+((B*h′+kHalf)>>kBit)  (Equation O51)

The quantized high-frequency component is expressed by (Equation O52).The inverse quantization of the high-frequency component is expressed by(Equation O53).[Math. 17]quantized_h′=((Aqs>>1)+(h′<<kBit))/Aqs  (Equation O52)h′=((quantized_h′*Aqs)+kHalf)>>kBit  (Equation O53)

The inverse transform is expressed by (Equation O54) to (Equation O55).[Math. 18]c ₁ ′=l′((B*+kHalf)>>kBit)  (Equation O54)c ₂ ′+h′+c ₁′  (Equation O55)

In the following, an example will be described in which the integer Haaris implemented by RAHT by using a conditional flag, setting the bitaccuracy of the rounding to be 0, and setting Aqs. When the integer Haaris applied, the three-dimensional data encoding device sets the weightto be 1 (w₁=w2=1). The three-dimensional data encoding device also setskHalf to be 0 (kHalf=0). The three-dimensional data encoding device alsoswitches Aqs as follows. The three-dimensional data encoding device setsAqs=QS when using the integer Haar transform. The three-dimensional dataencoding device sets Aqs=sqrt_integer (((QS*QS)*(w₁+w2))/(w₁*w₂)) whenusing the integer RAHT. Here, sqrt_integer(n) represents the integerpart of the square root of n. Therefore, (Equation O56) holds.

[Math. 19] $\begin{matrix}{B = {\frac{\left( {1 ⪡ {kBit}} \right)}{2} = \left( {1 ⪡ \left( {{kBit} - 1} \right)} \right)}} & \left( {{Equation}\mspace{14mu}{O56}} \right)\end{matrix}$

The forward transform of the integer Haar in RAHT is expressed by(Equation O57) to (Equation O59).[Math. 20]h′=c ₂ ′−c ₁′  (Equation O57)l′=c ₁′((B*h′+0)>>kBit)=c ₁′+(h′>>1)  (Equation O58)quantized_h′=((Aqs>>1)+(h′<<kBit))/Aqs  (Equation O59)

When the reversible encoding is used, QS is set to be 1, and therefore,(Equation O60) holds. When the reversible encoding is used, thequantization and the inverse quantization may be skipped.

[Math. 21] $\begin{matrix}{{{quantized\_}h}^{\prime} = {\frac{\left( {1 ⪢ 1} \right) + \left( {h^{\prime} ⪡ {kBit}} \right)}{1} = {h^{\prime} ⪡ {kBit}}}} & \left( {{Equation}\mspace{14mu}{O60}} \right)\end{matrix}$

The inverse quantization of the high-frequency component is expressed by(Equation O61). The inverse integer transform is expressed by (EquationO62) to (Equation O63).[Math. 22]h′=(quantized_h′*Aqs)>>kBit  (Equation O61)c ₁ ′=l′−((B*h′+0)>>kBit)=l′−(h′>>1)  (Equation O62)c ₂ ′=h′+c ₁′  (Equation O63)

As another example of the implementation of the reversible encoding, thebits shift calculations described below may be used. These calculationsare performed for the integer data type (fixed point calculation). Theattribute information is shifted up with the kBit accuracy before thetransform processing.

When applying the integer Haar, the three-dimensional data encodingdevice sets the weight to be 1 (w₁=w₂₌₁). The three-dimensional dataencoding device also sets kHalf to be 0 (kHalf=0). The three-dimensionaldata encoding device also switches Aqs as follows. The three-dimensionaldata encoding device sets Aqs=QS when using the integer Haar transform.The three-dimensional data encoding device sets Aqs=sqrt_integer(((QS*QS)*(w₁+w₂))/(w₁*w2)) when using the integer RAHT. Therefore,(Equation O64) holds.

[Math. 23] $\begin{matrix}{B = {\frac{\left( {1 ⪡ {kBit}} \right)}{2} = \left( {1 ⪡ \left( {{kBit} - 1} \right)} \right)}} & \left( {{Equation}\mspace{14mu}{O64}} \right)\end{matrix}$

As shown by (Equation O65), the attribute information is shifted up withthe kBit accuracy before the transform processing.[Math. 24]c _(i) =c _(i) <<kBit  (Equation O65)

The forward transform of the integer Haar in RATH is expressed by(Equation O66) to (Equation O67), and is performed with the kBitaccuracy.[Math. 25]h′=c ₂ ′−c ₁′  (Equation O66)t_l′=((B*h++kHalf)>>kBit)  (Equation O67)

In order to remove the floating-point accuracy of B for the floorfunction, the kBit accuracy for the low-frequency component is removed.Therefore, the low-frequency component is expressed by (Equation O68).[Math. 26]l′=c ₁′+((t_l′>>kBit)<<kBit)  (Equation O68)The inverse integer transform is expressed by (Equation O69) to(Equation O71). In this way, switching from the integer RAHT can bereduced.[Math. 27]t_l′=((B*h′+khalf)>>kBit)  (Equation O69)=c ₁ ′=l′((t_l′>> _(k)Bit)<<kBit)  (Equation O70)c ₂ ′=h′+c ₁′  (Equation O71)

In the following, an example configuration for the forward transformwill be described. FIG. 72 is a diagram showing an example configurationof integer RAHT/Haar transformer 8402. Integer RAHT/Haar transformer8402 includes left shifters 8421, 8422, and 8430, subtractor 8423,divider 8424, right shifters 8425, 8427, and 8329, multiplier 8426,switcher 8428, and adder 8431.

Left shifters 8421 and 8422 shift up (shift to the left) c1 and c2 bykBit when c1 and c2 are original signals (signals located in the bottomlayer of RAHT) of attribute information. As a result, the bit accuracyof the original signals increases, and therefore, the calculationaccuracy of the transform processing can be improved. Therefore, theencoding efficiency can be improved. When c1 and c2 are signals in alayer higher than the bottom layer of RAHT, the kBit shift-up need notbe applied.

Note that, when the integer Haar transform is applied, and QS=1 (whichmeans the reversible encoding), the three-dimensional data encodingdevice need not apply the kBit shift-up to the original signals of theattribute information located in the bottom layer of RAHT. In this way,the reversible encoding can be achieved while reducing the processingamount.

Subtractor 8423 subtracts shifted-up c1 from shifted-up c2. Divider 8424divides the value obtained by subtractor 8423 by Aqs. Here, Aqs isexpressed by (Equation O72). integer_square_root(n) represents theinteger part of the square root of n. That is, Aqs depends on QS(quantization step) and the weight. When the integer Haar transform isused, Aqs is set so that Aqs=QS.

[Math. 28] $\begin{matrix}{{Aqs} = {{integer\_ square}{\_ root}\left( \frac{{QS}*{QS}*\left( {w_{1} + w_{2}} \right)}{w_{1}*w_{2}} \right)}} & \left( {{Equation}\mspace{14mu}{O72}} \right)\end{matrix}$

Right shifter 8425 generates high-frequency component h by shifting downthe value obtained by divider 8424. Multiplier 8426 multiplies the valueobtained by subtractor 8423 by B. B is expressed by (Equation O73). Whenthe integer Haar transformer is used, the weight is set so that w₁=w₂=1.

[Math. 29] $\begin{matrix}{B = \frac{\left( {w_{2} ⪡ {kBit}} \right)}{w_{1} + w_{2}}} & \left( {{Equation}\mspace{14mu}{O73}} \right)\end{matrix}$

Right shifter 8427 shifts down the value obtained by multiplier 8426.Switcher 8428 outputs the value obtained by right shifter 8427 to rightshifter 8429 when the integer Haar transformer is used, and outputs thevalue obtained by right shifter 8427 to adder 8431 when the integer Haartransformer is not used.

When the integer Haar transformer is applied, right shifter 8429 shiftsdown the value obtained by right shifter 8427 by kBit, and left shifter8430 shifts up the value obtained by right shifter 8427 by kBit. In thisway, the values of lower-order kBit bits are set to be 0. That is, thedigits after the decimal point resulting from the division by a value of2 when the integer Haar transformer is applied can be deleted, and thus,the processing of rounding a value down (floor processing) can beachieved. Note that any method that can achieve the process of roundinga value down can be applied.

Note that, when QS>1 (which means the irreversible encoding) in theinteger Haar transformer, the kBit shift down and the kBit shift up neednot be applied to the value obtained by right shifter 8427. In this way,the accuracy after the decimal point resulting from the division by avalue of 2 can be maintained when the integer Haar transformer isapplied. Therefore, the calculation accuracy and the encoding efficiencyare improved.

When the original signals (located in the bottom layer of RAHT) of theattribute information are not shifted up by kBit, the kBit shift downand the kBit shift up need not be applied to the value obtained by rightshifter 8427. In this way, the processing amount can be reduced.

Adder 8431 generates low-frequency component 1 by adding the valueobtained by left shifter 8430 or right shifter 8427 to the valueobtained by left shifter 8421. Note that, in the calculation for the toplayer, resulting low-frequency component 1 is subjected to the kBitshift down.

Next, an example configuration for the inverse transform will bedescribed. FIG. 73 is a diagram showing an example configuration ofinverse integer RAHT/Haar transformer 8414. Inverse integer RAHT/Haartransformer 8414 includes left shifters 8441 and 8447, multipliers 8442,8443, and 8449, right shifters 8444, 8446, 8450, and 8452, switcher8445, and subtractors 8448 and 8451.

Left shifter 8441 shifts up (shifts to the left) high-frequencycomponent h by kBit. Multiplier 8442 multiplies the value obtained byleft shifter 8441 by Aqs. Note that Aqs is the same as Aqs describedabove with reference to FIG. 72 . Multiplier 8443 multiplies the valueobtained by multiplier 8442 by B. Note that B is the same as B describedabove with reference to FIG. 72 .

Right shifter 8444 shifts down the value obtained by multiplier 8443.Switcher 8445 outputs the value obtained by right shifter 8444 to rightshifter 8446 when the integer Haar transformer is used, and outputs thevalue obtained by right shifter 8444 to subtractor 8448 when the integerHaar transformer is not used.

When the integer Haar transformer is applied, right shifter 8446 shiftsdown the value obtained by right shifter 8444 by kBit, and left shifter8447 shifts up the value obtained by right shifter 8444 by kBit. In thisway, the values of lower-order kBit bits are set to be 0. That is, thedigits after the decimal point resulting from the division by a value of2 when the integer Haar transformer is applied can be deleted, and thus,the processing of rounding a value down (floor processing) can beachieved. Note that any method that can achieve the process of roundinga value down can be applied.

Note that, when QS>1 (which means the irreversible encoding) in theinteger Haar transformer, the kBit shift down and the kBit shift up neednot be applied to the value obtained by right shifter 8444. In this way,the accuracy after the decimal point resulting from the division by avalue of 2 can be maintained when the integer Haar transformer isapplied. Therefore, a bitstream improved in the calculation accuracy andthe encoding efficiency can be properly decoded.

When the decoded signals (located in the bottom layer of RAHT) of theattribute information are not shifted down by kBit, the kBit shift downand the kBit shift up need not be applied to the value obtained by rightshifter 8444. In this way, the processing amount can be reduced.

Subtractor 8448 subtracts the value obtained by left shifter 8447 orright shifter 8444 from low-frequency component 1. Note that, in thecalculation for the top layer, low-frequency component 1 is shifted upby kBit, and subtractor 8448 subtracts the value obtained by leftshifter 8447 or right shifter 8444 from shifted-up low-frequencycomponent 1.

Multiplier 8449 multiplies the value obtained by subtractor 8448 by −1.Right shifter 8450 shifts down the value obtained by multiplier 8449 bykBit. Subtractor 8451 subtracts the value obtained by subtractor 8448from the value obtained by multiplier 8442. Right shifter 8452 shiftsdown the value obtained by subtractor 8451 by kBit. In this way, theoriginal bit accuracy of c1 and c2 is recovered. By this processing, thedecoding result can be obtained with the original bit accuracy whileimproving the calculation accuracy of the transform processing. Thethree-dimensional data decoding device need not apply the kBit shiftdown to any signal in a layer higher than the bottom layer of RAHT.

Note that, when the integer Haar transform is applied, and QS=1 (whichmeans the reversible encoding), the three-dimensional data decodingdevice need not apply the kBit shift-up to the decoded signals of theattribute information located in the bottom layer of RAHT. In this way,a reversibly encoded bitstream can be properly decoded while reducingthe processing amount.

As stated above, the three-dimensional data encoding device according tothe present embodiment performs the process shown by FIG. 74 . Thethree-dimensional data encoding device converts pieces of attributeinformation of three-dimensional points included in point cloud datainto coefficient values (S8401), and encodes the coefficient values togenerate a bitstream (S8402). In the converting (S8401), thethree-dimensional data encoding device performs weighting calculationhierarchically to generate the coefficient values belonging to one oflayers, the weighting calculation separating each of the pieces ofattribute information into a high-frequency component and alow-frequency component. In the weighting calculation, thethree-dimensional data encoding device performs the weightingcalculation using weights fixed or not fixed in the layers. Thebitstream includes first information (at least one of RAHT-HAAR_FLAG orQP) indicating whether to fix the weights in the layers.

With this, since the three-dimensional data encoding device is capableof reducing the loss caused by the transform, by fixing the weight for aplurality of layers, the three-dimensional data encoding device iscapable of improving the accuracy.

For example, when the weights are fixed in the layers, the weights arefixed to 1.

For example, as shown by FIG. 72 , in the weighting calculation, thethree-dimensional data encoding device subtracts first attributeinformation (e.g., c1) from second attribute information (e.g., c2) tocalculate a first value, the first attribute information and the secondattribute information being included in the pieces of attributeinformation, and divides the first value by a first coefficient (e.g.,Aqs) to calculate the high-frequency component (e.g., h). The firstcoefficient (e.g., Aqs) depends on a quantization step (e.g., QS) andthe weights (e.g., w₁, w₂).

For example, as shown by FIG. 72 , in the weighting calculation, thethree-dimensional data encoding device multiplies the first value by asecond coefficient (e.g., B) depending on the weights to calculate asecond value, shifts down the second value by a predetermined bit countand shifts up the second value by the predetermined bit count tocalculate a third value, and adds the third value to the first attributeinformation to calculate the low-frequency component (e.g., 1).

For example, the three-dimensional data encoding device includes aprocessor and memory, and the processor performs the above process usingthe memory.

The three-dimensional data decoding device according to the presentembodiment performs the process shown by FIG. 75 . The three-dimensionaldata decoding device obtains, from a bitstream, first information (atleast one of RAHT-HAAR_FLAG or QP) indicating whether to fix weights inlayers (S8411), decodes coefficient values from the bitstream (S8412),and reverse converts the coefficient values to generate pieces ofattribute information of three-dimensional points included in pointcloud data (S8413). The coefficient values belong to one of the layers.In the reverse converting, the three-dimensional data decoding deviceperforms inverse weighting calculation to generate the pieces ofattribute information, the inverse weighting calculation combining thecoefficient values with a high-frequency component and a low-frequencycomponent. In the inverse weighting calculation, the three-dimensionaldata decoding device performs the inverse weighting calculation usingthe weights fixed or not fixed in the layers, according to the firstinformation.

With this, since the three-dimensional data decoding device is capableof reducing the loss caused by the transform, by fixing the weight for aplurality of layers, the three-dimensional data decoding device iscapable of improving the accuracy.

For example, when the weights are fixed in the layers, the weights arefixed to 1.

For example, as shown by FIG. 73 , in the inverse weighting calculation,the three-dimensional data decoding device multiplies the high-frequencycomponent by a first coefficient (e.g., Aqs) to calculate a first value,calculates first attribute information (e.g., c1) included in the piecesof attribute information from a second value based on the low-frequencycomponent (e.g., 1), and subtracts the second value from the first valueto calculate second attribute information (e.g., c2) included in thepieces of attribute information. The first coefficient (e.g., Aqs)depends on a quantization step (e.g., QS) and the weights (e.g., w₁,w₂).

For example, as shown by FIG. 73 , in the inverse weighting calculation,the three-dimensional data decoding device multiplies the first value bya second coefficient (e.g., B) depending on the weights to calculate athird value, shifts down the third value by a predetermined bit countand shifts up the third value by the predetermined bit count tocalculate a fourth value, and subtracts the low-frequency component fromthe fourth value to calculate the second value.

For example, the three-dimensional data decoding device includes aprocessor and memory, and the processor performs the above process usingthe memory.

Embodiment 10

In the present embodiment, a region adaptive hierarchical transform(RAHT) process or a Haar transform process using prediction will bedescribed. FIG. 76 is a diagram for describing a prediction process andillustrates a hierarchical structure in the RAHT process or the Haartransform process. At the time of hierarchical encoding using the RAHTor the Haar transform, a three-dimensional data encoding device maypredict attribute values (items of attribute information) of a low layerfrom attribute values of a high layer and may encode difference valuesbetween the attribute values of the low layer and their predicted valuesobtained by the prediction. For example, when hierarchically repeatingthe encoding from a high layer toward a low layer to encode attributevalues of each layer, the three-dimensional data encoding device usesattribute values calculated at the high layer (attribute values of aparent node group) to predict attribute values of the low layer(attribute values of a child node group). The three-dimensional dataencoding device may encode, instead of an attribute value of each childnode, a difference value resulting from subtracting a predicted valuefrom the attribute value of each child node. According to the above, thedifference values of attribute values of a low layer can be reduced bygenerating appropriate predicted values from attribute values of a highlayer, thereby improving the coding efficiency. Note that the sameprediction process may be performed by the three-dimensional datadecoding device.

FIG. 77 is a diagram illustrating an example of the relation among nodesin an octree structure based on items of geometry information onthree-dimensional points. As illustrated in FIG. 77 , thethree-dimensional data encoding device predicts an attribute value of achild node from attribute values of parent nodes or neighboring parentnodes. Here, a plurality of nodes belonging to the same layer as aparent node will be referred to as a parent node group. A plurality ofchild nodes of the parent node will be referred to as a child nodegroup. Neighboring parent nodes are nodes that are included in theparent node group, are different from the parent node, and neighbor theparent node. Note that a parent node group may include some of theplurality of nodes belonging to the same layer as the parent node. Forexample, a parent node group may include a parent node and its pluralityof neighboring parent nodes. Alternatively, a parent node group mayinclude nodes within a predetermined distance from a parent node (or acurrent node).

An item of attribute information of a node belonging to a high layersuch as a parent node is calculated from, for example, items ofattribute information of a low layer of the node. For example, an itemof attribute information of a parent node is an average value of aplurality of items of attribute information of a plurality of childnodes of the parent node. Note that the method for calculating an itemof attribute information of a node belonging to a high layer is notlimited to calculating an arithmetic average and may be another methodsuch as calculating a weighted average.

For example, the three-dimensional data encoding device may calculatedistances d between a current node that is a child node to be subjectedto the encoding and its parent nodes or neighboring parent nodes in athree-dimensional space and uses a weighted average value calculatedwith the distances d as a predicted value. For example, a predictedvalue cp of a child node c may be calculated by the following (EquationP1) and (Equation P2). Ai denotes a value of an item of attributeinformation of a parent node pi, and d(c,pi) is a distance, which is aEuclidean distance for example, between the child node c and the parentnode pi. The symbol n denotes the total number of parent nodes andneighboring parent nodes used for generating the predicted value.

[Math. 30] $\begin{matrix}{{cp} = {\sum\limits_{i = 0}^{n}\;{w_{i} \times A_{i}}}} & \left( {{Equation}\mspace{14mu}{P1}} \right) \\{w_{i} = \frac{d\left( {c,{pi}} \right)}{\sum\limits_{j = 0}^{n}\;{d\left( {c,{pj}} \right)}}} & \left( {{Equation}\mspace{14mu}{P2}} \right)\end{matrix}$

Alternatively, the three-dimensional data encoding device may use anattribute value of a parent node or a neighboring parent node as it isas the predicted value. For example, the three-dimensional data encodingdevice may use an attribute value Ap of a parent node as a predictedvalue of a child node or may use an attribute value Anp of a neighboringparent node as the predicted value of the child node. Alternatively, thethree-dimensional data encoding device may select whether to use acalculated value (e.g., a weighted average value) calculated from itemsof attribute information of a plurality of nodes included in a parentnode group or to use an attribute value of a parent node or aneighboring parent node as it is.

In this case, the three-dimensional data encoding device may addinformation indicating which of the calculated value and the attributevalue of a parent node or a neighboring parent node is used as thepredicted value (prediction mode) to a bitstream for each child nodegroup, for example. This allows the three-dimensional data encodingdevice to select an appropriate prediction mode for each child nodegroup, so that the coding efficiency can be improved. In addition, byadding a prediction mode to a bitstream, the three-dimensional datadecoding device can generate a predicted value using the prediction modeselected by the three-dimensional data encoding device. Thethree-dimensional data decoding device thus can decode the bitstreamappropriately.

Note that, rather than being added for each child node group, aprediction mode may be added for each unit larger or smaller than thechild node group. For example, the three-dimensional data encodingdevice adds a prediction mode for every N child node group, N being aninteger greater than or equal to 1, so that the coding efficiency can beimproved while the overhead for encoding the prediction mode is reduced.The three-dimensional data encoding device may add a prediction mode toa header or the like such as APS. Here, APS is a parameter set of itemsof attribute information for each frame.

Next, a first example of the encoding method with prediction will bedescribed. FIG. 78 is a diagram illustrating the first example of theencoding method.

When calculating difference values between attribute values andpredicted values, the three-dimensional data encoding device applies theRAHT or the Haar transform to both the attribute values and thepredicted values to calculate transform coefficients of the attributevalues and transform coefficients of the predicted values. Thethree-dimensional data encoding device determines difference valuesbetween the transform coefficients of the attribute values and thetransform coefficients of the predicted values. The difference values tobe encoded thus can be decreased, so that the coding efficiency can beimproved.

In a case where the three-dimensional data encoding device selectspredicted values from between the calculated values and the attributevalues of parent nodes or neighboring parent nodes (in a case where aprediction mode is added to a bitstream), for example, thethree-dimensional data encoding device may use the predicted values ineach prediction mode to calculate the difference values of the transformcoefficients, determine a cost value from a sum of absolute values ofthe difference values, and select a prediction mode that minimizes thecost. The prediction mode minimizing the difference values thus can beselected appropriately, so that the coding efficiency can be improved.For example, the three-dimensional data encoding device may use thefollowing (Equation P3) to calculate a cost value cost.[Math. 31]cost=Σ_(i=0) ^(m) |T _(i) −PT _(i)|+λ*Predbit  (Equation P3)

Here, m denotes the number of child nodes included in a child nodegroup. The symbol λ denotes an adjustment parameter. Predbit denotes thenumber of bits necessary for encoding a prediction mode. Ti denotes atransform coefficient of an attribute value, and PTi denotes a transformcoefficient of a predicted value. Note that this does not limit themethod for selecting the prediction mode, and the prediction mode may beselected under other conditions or based on instructions or the likefrom the outside. As illustrated in FIG. 78 , the three-dimensional dataencoding device applies the RAHT or the Haar transform to attributevalues of a child node group to calculate transform coefficients Ti ofthe attribute values (S9101). In addition, the three-dimensional dataencoding device predicts the attribute values of the child node groupfrom attribute values of a parent node group to generate predictedvalues of the child node group (S9102). The three-dimensional dataencoding device next applies the RAHT or the Haar transform to thepredicted values to calculate transform coefficients PTi of thepredicted values (S9103).

The three-dimensional data encoding device next calculates differencevalues that are differences between the transform coefficients Ti of theattribute values and the transform coefficients PTi of the predictedvalues (S9104). The three-dimensional data encoding device nextquantizes the difference values (S9105) and performs arithmetic encodingon the quantized difference values (S9106) to generate encoded data (abitstream). Note that, when using a lossless coding, thethree-dimensional data encoding device may skip the quantization(S9105).

Next, a first example of a decoding method for decoding the encoded data(bitstream) generated by the encoding method in the first example willbe described. FIG. 79 is a diagram illustrating the first example of adecoding method.

First, the three-dimensional data decoding device performs arithmeticdecoding on the encoded data (bitstream) (S9111) and performs inversequantization on the resulting signal (S9112) to generate the differencevalues of the transform coefficients of the child node group. Note that,when using a lossless decoding (when a lossless coding is used), thethree-dimensional data decoding device may skip the inverse quantization(S9112).

In addition, the three-dimensional data decoding device predicts theattribute values of the child node group from the attribute values ofthe parent node group to generate the predicted values (S9113). Notethat in a case where the three-dimensional data encoding device has madea selection as to whether to use calculated values or to use attributevalues of parent nodes or neighboring parent nodes (in a case where aprediction mode is added to a bitstream) to generate predicted values,the three-dimensional data decoding device uses the decoded predictionmode to generate the predicted values. The three-dimensional datadecoding device next applies the RAHT or the Haar transform to thepredicted values to calculate transform coefficients PTi of thepredicted values (S9114).

The three-dimensional data decoding device next adds the transformcoefficients PTi of the predicted values to the difference values of thetransform coefficients of the child node group to calculate transformcoefficients Ti of the child node group (S9115). The three-dimensionaldata decoding device next applies inverse RAHT or inverse Haar transformto the transform coefficients Ti of the child node group to generatedecoded values of the attribute values of the child node group (S9116).The three-dimensional data decoding device thus can decode the bitstreamappropriately.

Next, a second example of the encoding method will be described. In thissecond example, integer Haar transform is used in place of the RATH orthe Haar transform. FIG. 80 is a diagram illustrating the second exampleof the encoding method.

When calculating difference values between attribute values andpredicted values, the three-dimensional data encoding device may applythe integer Haar transform to both the attribute values and thepredicted values to calculate transform coefficients of the attributevalues and transform coefficients of the predicted values and determinedifference values between the transform coefficients of the attributevalues and the transform coefficients of the predicted values. Thethree-dimensional data encoding device thus can decrease the differencevalues to be encoded, so that the coding efficiency can be improved.

The three-dimensional data encoding device may be configured such that,when selecting predicted values from between the calculated values andthe attribute values of parent nodes or neighboring parent nodes (in acase where a prediction mode is added to a bitstream), for example, thethree-dimensional data encoding device uses the predicted values in eachprediction mode to calculate the difference values of the transformcoefficients, determines a cost value from a sum of absolute values ofthe difference values, and selects a prediction mode that minimizes thecost. The three-dimensional data encoding device thus can appropriatelyselect the prediction mode minimizing the difference values, so that thecoding efficiency can be improved. For example, the three-dimensionaldata encoding device may use the above (Equation P3) to calculate a costvalue cost.

As illustrated in FIG. 80 , the three-dimensional data encoding deviceapplies the integer Haar transform to attribute values of a child nodegroup to calculate transform coefficients Ti of the attribute values(S9101A). In addition, the three-dimensional data encoding devicepredicts the attribute values of the child node group from attributevalues of a parent node group to generate predicted values of the childnode group (S9102).

When applying the integer Haar transform, the three-dimensional dataencoding device discards values of fractional portions of the predictedvalues (S9107). Alternatively, the three-dimensional data encodingdevice may apply rounding or the like to the predicted values to set 0to the values of the fractional portions of the predicted values. Forexample, when kBit bits of an attribute value represent a fractionalportion of the attribute value, the three-dimensional data encodingdevice sets 0 to a value of the fractional portion being the kBit bitsby subjecting the value to discarding (flooring process) in which aright shift by kBit and a left shift by kBit is applied to the predictedvalues. By converting the predicted values into integral values beforethe integer Haar transform is applied, transform coefficients of thepredicted values after the integer Haar transform are also integralvalues. Thus, difference values between the transform coefficients Ti ofthe attribute values of the child node group and transform coefficientsPTi of the predicted value of the child node group are also integralvalues. A lossless coding with the integer Haar transform thus can beimplemented. Note that any method that sets 0 to the values of thefractional portions of the predicted values is applicable.

Alternatively, the three-dimensional data encoding device may store aflag indicating whether to apply the integer Haar transform in abitstream and may set 0 to the fractional portions of the predictedvalues when applying the integer Haar transform or need not set 0 to thefractional portions when not applying the integer Haar transform. Notethat, in a case of QS>1 (lossy coding) in the integer Haar transform,the three-dimensional data encoding device need not apply the process ofsetting 0 to the fractional portions of the predicted values. Thismaintains the precision of the fractional portions of the predictedvalues when the integer Haar transform is applied, so that the precisionin the calculation is improved. The coding efficiency thus can beimproved.

The three-dimensional data encoding device next applies the integer Haartransform to the predicted values after the discarding to calculate thetransform coefficients PTi of the predicted values (S9103A). Thethree-dimensional data encoding device next calculates difference valuesthat are differences between the transform coefficients Ti of theattribute values and the transform coefficients PTi of the predictedvalues (S9104).

Here, the difference values of the transform coefficients may beconverted into integral values and then subjected to arithmeticencoding. In this case, information on their fractional portions islost. For that reason, the three-dimensional data encoding device sets avalue of 0 beforehand to values of the fractional portions of thedifference values of the transform coefficients, for supporting alossless coding. This prevents the information from being lost when thedifference values are converted into the integral values beforearithmetic encoding, enabling the implementation of lossless coding.

The three-dimensional data encoding device next quantizes the differencevalues (S9105) and performs arithmetic encoding on the quantizeddifference values (S9106) to generate encoded data (a bitstream). Notethat, when using a lossless coding, the three-dimensional data encodingdevice may skip the quantization (S9105).

Next, a second example of a decoding method for decoding the encodeddata (bitstream) generated by the encoding method in the second examplewill be described. FIG. 81 is a diagram illustrating the second exampleof a decoding method.

First, the three-dimensional data decoding device performs arithmeticdecoding on the encoded data (bitstream) (S9111) and performs inversequantization on the resulting signal (S9112) to generate the differencevalues of the transform coefficients of the child node group. Note that,when using a lossless decoding (when a lossless coding is used), thethree-dimensional data decoding device may skip the inverse quantization(S9112).

In addition, the three-dimensional data decoding device predicts theattribute values of the child node group from the attribute values ofthe parent node group to generate the predicted values (S9113). Notethat in a case where the three-dimensional data encoding device has madea selection as to whether to use calculated values or to use attributevalues of parent nodes or neighboring parent nodes (in a case where aprediction mode is added to a bitstream) to generate predicted values,the three-dimensional data decoding device uses the decoded predictionmode to generate the predicted values.

When applying the integer Haar transform, the three-dimensional datadecoding device discards values of fractional portions of the predictedvalues (S9117). Alternatively, the three-dimensional data decodingdevice may apply rounding or the like to the predicted values to set 0to the values of the fractional portions of the predicted values. Forexample, when kBit bits of an attribute value represent a fractionalportion of the attribute value, the three-dimensional data decodingdevice may set 0 to a value of a fractional portion of a predicted valuebeing kBit bits of the predicted value by subjecting the value todiscarding (flooring process) in which a right shift by kBit and a leftshift by kBit is applied to the predicted value. By converting thepredicted values into integral values before the integer Haar transformis applied, transform coefficients of the predicted values after theinteger Haar transform are also integral values. Thus, added values ofthe transform coefficients Ti of the attribute values of the child nodegroup and transform coefficients PTi of the predicted value of the childnode group are also integral values. The three-dimensional data decodingdevice thus can appropriately decode the bitstream resulting from thelossless coding with the integer Haar transform. Note that any methodthat sets 0 to the values of the fractional portions of the predictedvalues is applicable.

Alternatively, the three-dimensional data decoding device may obtain theflag indicating whether to apply the integer Haar transform in abitstream and may set 0 to the fractional portions of the predictedvalues when applying the integer Haar transform or need not set 0 to thefractional portions when not applying the integer Haar transform. Notethat, in a case of QS>1 (lossy decoding) in the integer Haar transform,the three-dimensional data decoding device need not apply the process ofsetting 0 to the fractional portions of the predicted values. Thethree-dimensional data decoding device thus maintains the precision ofthe fractional portions of the predicted values when the integer Haartransform is applied, so that the precision in the calculation isimproved, and the three-dimensional data decoding device canappropriately decode the bitstream with the improved coding efficiency.

The three-dimensional data decoding device next applies the integer Haartransform to the predicted values after the discarding to calculate thetransform coefficients PTi of the predicted values (S9114A). Thethree-dimensional data decoding device next adds the transformcoefficients PTi of the predicted values to the difference values of thetransform coefficients of the child node group to calculate transformcoefficients Ti of the child node group (S9115). The three-dimensionaldata decoding device next applies inverse integer Haar transform to thetransform coefficients Ti of the child node group to generate decodedvalues of the attribute values of the child node group (S9116A). Thethree-dimensional data decoding device thus can decode the bitstreamappropriately.

Next, a third example of the encoding method will be described. In thisthird example, the integer Haar transform is used as in the secondexample. In addition, the third example differs from the second examplein that a timing for performing discarding (S9108) is after the integerHaar transform (S9103A) is applied.

FIG. 82 is a diagram illustrating the third example of the encodingmethod. The following description will be given mainly of differencesfrom the second example, and redundant description will be omitted.

As illustrated in FIG. 82 , the three-dimensional data encoding deviceapplies the integer Haar transform to attribute values of a child nodegroup to calculate transform coefficients Ti of the attribute values(S9101A). In addition, the three-dimensional data encoding devicepredicts the attribute values of the child node group from attributevalues of a parent node group to generate predicted values of the childnode group (S9102).

The three-dimensional data encoding device next applies the integer Haartransform to the predicted values to calculate the transformcoefficients PTi of the predicted values (S9103A). The three-dimensionaldata encoding device next performs the discarding on the transformcoefficients PTi to set 0 to fractional portions of the transformcoefficients (S9108). Note that the detail of the discarding is the sameas that of step S9107 described above except that a signal to besubjected to the process is not the predicted values but the transformcoefficients PTi.

The three-dimensional data encoding device next calculates differencevalues that are differences between the transform coefficients Ti of theattribute values and the transform coefficients PTi of the predictedvalues after the discarding (S9104).

Next, a third example of a decoding method for decoding the encoded data(bitstream) generated by the encoding method in the third example willbe described. FIG. 83 is a diagram illustrating the third example of adecoding method.

First, the three-dimensional data decoding device performs arithmeticdecoding on the encoded data (bitstream) (S9111) and performs inversequantization on the resulting signal (S9112) to generate the differencevalues of the transform coefficients of the child node group. Note that,when using a lossless decoding (when a lossless coding is used), thethree-dimensional data decoding device may skip the inverse quantization(S9112).

In addition, the three-dimensional data decoding device predicts theattribute values of the child node group from the attribute values ofthe parent node group to generate the predicted values (S9113).

The three-dimensional data decoding device next applies the integer Haartransform to the predicted values to calculate the transformcoefficients PTi of the predicted values (S9114A). The three-dimensionaldata decoding device next performs discarding on the transformcoefficients PTi to set 0 to fractional portions of the transformcoefficients (S9118). Note that the detail of the discarding is the sameas that of step S9117 described above except that a signal to besubjected to the process is not the predicted values but the transformcoefficients PTi.

The three-dimensional data decoding device next adds the transformcoefficients PTi of the predicted values after the discarding to thedifference values of the transform coefficients of the child node groupto calculate transform coefficients Ti of the child node group (S9115).The three-dimensional data decoding device next applies the inverseinteger Haar transform to the transform coefficients Ti of the childnode group to generate decoded values of the attribute values of thechild node group (S9116A). The three-dimensional data decoding devicethus can decode the bitstream appropriately.

Next, a fourth example of the encoding method will be described. Throughthe first to third examples, the examples in which one of the transformprocesses are applied to the attribute values and the predicted values,and the difference values between the generated transform coefficientsof the attribute values and the generated transform coefficients of thepredicted values have been described. In the fourth example, thethree-dimensional data encoding device calculates difference valuesbetween attribute values and predicted values and applies the RAHT orthe Haar transform to the difference values to calculate transformcoefficients of the difference values. The three-dimensional dataencoding device thus can decrease the transform coefficients of thedifference values to be encoded while suppressing an increase in aprocessing load, so that the coding efficiency can be improved.

The three-dimensional data encoding device may be configured such that,when selecting predicted values from between the calculated values andthe attribute values of parent nodes or neighboring parent nodes (in acase where a prediction mode is added to a bitstream), for example, thethree-dimensional data encoding device uses the predicted values in eachprediction mode to calculate the difference values of the attributevalues, determines a cost value described below from a sum of absolutevalues of the difference values, and selects a prediction mode thatminimizes the cost. The three-dimensional data encoding device thus canappropriately select the prediction mode minimizing the differencevalues, so that the coding efficiency can be improved. For example, thethree-dimensional data encoding device may use the following (EquationP4) to calculate a cost value cost.[Math. 32]cost=Σ_(i+0) ^(m) |D _(i)|+λ*Predbit  (Equation. P4)

Here, m denotes the number of child nodes included in a child nodegroup. The symbol λ denotes an adjustment parameter. Predbit denotes thenumber of bits necessary for encoding a prediction mode. Di denotes adifference value between an attribute value and a predicted value.

Note that the three-dimensional data encoding device may use thefollowing (Equation P5) to calculate a cost value cost. Thethree-dimensional data encoding device thus can select the predictionmode decreasing values of the transform coefficients of the differencevalues, so that the coding efficiency can be improved.[Math. 33]cost=Σ_(i=0) ^(m) |T _(i)|+ζ*Predbit  (Equation P5)

Here, Ti denotes a transform coefficient of a difference value. Notethat this does not limit the method for selecting the prediction mode,and the prediction mode may be selected under other conditions or basedon instructions or the like from the outside.

FIG. 84 is a diagram illustrating the fourth example of the encodingmethod. As illustrated in FIG. 84 , the three-dimensional data encodingdevice predicts the attribute values of the child node group from theattribute values of the parent node group to generate the predictedvalues Pi (S9121). The three-dimensional data encoding device nextcalculates difference values Di that are differences between attributevalues Ai of the child node group and the predicted values Pi (S9122).The three-dimensional data encoding device next applies the RAHT or theHaar transform to the difference values Di to calculate transformcoefficients Ti of the difference values (S9123).

The three-dimensional data encoding device next quantizes the transformcoefficients Ti of the difference values (S9124) and performs arithmeticencoding on the quantized transform coefficients Ti (S9125) to generateencoded data (a bitstream). Note that, when using a lossless coding, thethree-dimensional data encoding device may skip the quantization(S9124).

Next, a fourth example of a decoding method for decoding the encodeddata (bitstream) generated by the encoding method in the fourth examplewill be described. FIG. 85 is a diagram illustrating the fourth exampleof a decoding method.

First, the three-dimensional data decoding device performs arithmeticdecoding on the encoded data (bitstream) (S9131) and performs inversequantization on the resulting signal (S9132) to generate the transformcoefficients Ti of the difference values of the child node group. Notethat, when using a lossless decoding (when a lossless coding is used),the three-dimensional data decoding device may skip the inversequantization (S9132). The three-dimensional data decoding device nextapplies inverse RAHT or inverse Haar transform to the transformcoefficients Ti to generate the difference values Di of the attributevalues (S9133).

In addition, the three-dimensional data decoding device predicts theattribute values of the child node group from the attribute values ofthe parent node group to generate the predicted values (S9134). Notethat in a case where the three-dimensional data encoding device has madea selection as to whether to use calculated values or to use attributevalues of parent nodes or neighboring parent nodes (in a case where aprediction mode is added to a bitstream) to generate predicted values,the three-dimensional data decoding device uses the decoded predictionmode to generate the predicted values.

The three-dimensional data decoding device next adds the differencevalues Di and the predicted values Pi to generate decoded values of theattribute values of the child node group (S9135). The three-dimensionaldata decoding device thus can decode the bitstream appropriately.

Next, a fifth example of the encoding method will be described. Thisfifth example differs from the fourth example in that the integer Haartransform is used in place of the RATH or the Haar transform. FIG. 86 isa diagram illustrating the fifth example of the encoding method.

The three-dimensional data encoding device predicts the attribute valuesof the child node group from the attribute values of the parent nodegroup to generate the predicted values Pi (S9121). The three-dimensionaldata encoding device next performs discarding on the predicted values Pito set 0 to fractional portions of the predicted values (S9126). Notethat the detail of this process is the same as, for example, that ofstep S9107 illustrated in FIG. 80 .

The three-dimensional data encoding device next calculates differencevalues Di that are differences between attribute values Ai of the childnode group and the predicted values Pi after the discarding (S9122). Thethree-dimensional data encoding device next applies the integer Haartransform to the difference values Di to calculate transformcoefficients Ti of the difference values (S9123A).

The three-dimensional data encoding device next quantizes the transformcoefficients Ti of the difference values (S9124) and performs arithmeticencoding on the quantized transform coefficients Ti (S9125) to generateencoded data (a bitstream). Note that, when using a lossless coding, thethree-dimensional data encoding device may skip the quantization(S9124). Here, the transform coefficients of the difference values maybe converted into integral values and then subjected to arithmeticencoding, when information on fractional portions of the transformcoefficients is lost. In contrast, the three-dimensional data encodingdevice sets a value of 0 beforehand to values of the fractional portionsof the transform coefficients of the difference values. This preventsthe information from being lost when the transform coefficients Ti ofthe difference values are converted into the integral values beforearithmetic encoding, enabling the implementation of lossless coding.

Next, a fifth example of a decoding method for decoding the encoded data(bitstream) generated by the encoding method in the fifth example willbe described. FIG. 87 is a diagram illustrating the fifth example of adecoding method.

First, the three-dimensional data decoding device performs arithmeticdecoding on the encoded data (bitstream) (S9131) and performs inversequantization on the resulting signal (S9132) to generate the transformcoefficients Ti of the difference values of the child node group. Notethat, when using a lossless decoding (when a lossless coding is used),the three-dimensional data decoding device may skip the inversequantization (S9132). The three-dimensional data decoding device nextapplies the inverse integer Haar transform to the transform coefficientsTi to generate the difference values Di of the attribute values(S9133A).

In addition, the three-dimensional data decoding device predicts theattribute values of the child node group from the attribute values ofthe parent node group to generate the predicted values (S9134). Thethree-dimensional data decoding device next performs discarding on thepredicted values Pi to set 0 to fractional portions of the predictedvalues (S9136). Note that the detail of this process is the same as, forexample, that of step S9117 illustrated in FIG. 81 .

The three-dimensional data decoding device next adds the differencevalues Di and the predicted values Pi after the discarding to generatedecoded values of the attribute values of the child node group (S9135).The three-dimensional data decoding device thus can decode the bitstreamappropriately.

As described above, the three-dimensional data encoding device accordingto the present embodiment performs the process shown by FIG. 88 . First,the three-dimensional data encoding device generates a predicted valueof an item of attribute information of a current node in an N-ary treestructure (e.g., an octree structure) of three-dimensional pointsincluded in point cloud data, N being an integer greater than or equalto 2 (S9141). Next, the three-dimensional data encoding device encodesthe item of attribute information of the current node using thepredicted value and a transform process (e.g., RAHT, Haar transform, orinteger Haar transform) that hierarchically repeats an operation forseparating each of input signals into a high-frequency component and alow-frequency component (S9142). In the generating of the predictedvalue (S9141), the three-dimensional data encoding device selects, fromitems of attribute information of first nodes (e.g., a parent nodegroup), an item of attribute information of a node among the first nodeswhich is to be used in generating the predicted value of the currentnode, the first nodes including a parent node of the current node andbelonging to a same layer as the parent node.

The three-dimensional data encoding device thus can appropriately selectan item of attribute information which is to be used in generating thepredicted value, so that coding efficiency can be improved.

For example, in the selecting, the three-dimensional data encodingdevice selects whether to use an item of attribute information of asecond node directly as the predicted value or to calculate thepredicted value from the items of attribute information of the firstnodes, the second node being included in the first nodes. For example,the second node is the parent node.

For example, the three-dimensional data encoding device generatespredicted values of third nodes (e.g., a child node group) that includethe current node and belong to a same layer as the current node. In theencoding (S9142), the three-dimensional data encoding device performsthe transform process on items of attribute information of the thirdnodes to generate first transform coefficients (e.g., S9101 in FIG. 78); performs the transform process on the predicted values of the thirdnodes to generate second transform coefficients (e.g., S9103);calculates difference values between corresponding ones of the firsttransform coefficients and the second transform coefficients (e.g.,S9104); and encodes the difference values calculated (e.g., S9106).

For example, the transform process is an integer-to-integer transform(e.g., integer Haar transform). In the generating of the secondtransform coefficients, the three-dimensional data encoding devicediscards fractional portions of the predicted values of the third nodes(e.g., S9107 in FIG. 80 ), and performs the transform process on thepredicted values after the discarding to generate the second transformcoefficients (e.g., S9103A).

For example, the transform process is an integer-to-integer transform(e.g., integer Haar transform). In the calculating of the differencevalues, the three-dimensional data encoding device discards fractionalportions of the second transform coefficients (e.g., S9108 in FIG. 82 ),and calculates the difference values using the second transformcoefficients after the discarding (S9104).

For example, the three-dimensional data encoding device includes aprocessor and memory. Using the memory, the processor performs theabove-described process.

The three-dimensional data decoding device according to the presentembodiment performs the process shown by FIG. 89 . First, thethree-dimensional data decoding device obtains, from a bitstream, adifference value between an item of attribute information and apredicted value of a current node in an N-ary tree structure (e.g., anoctree structure) of three-dimensional points included in point clouddata, N being an integer greater than or equal to 2 (S9151). Next, thethree-dimensional data decoding device generates the predicted value(S9152). Finally, the three-dimensional data decoding device decodes theitem of attribute information of the current node using the differencevalue, the predicted value, and an inverse transform process of atransform process (e.g., RAHT, Haar transform, or integer Haartransform) that hierarchically repeats an operation for separating eachof input signals into a high-frequency component and a low-frequencycomponent (S9153). In the generating of the predicted value (S9152), thethree-dimensional data decoding device selects, from items of attributeinformation of first nodes (e.g., a parent node group), an item ofattribute information of a node among the first nodes which is to beused in generating the predicted value of the current node, the firstnodes including a parent node of the current node and belonging to asame layer as the parent node.

The three-dimensional data decoding device thus can appropriately selectan item of attribute information which is to be used in generating thepredicted value, so that coding efficiency can be improved.

For example, in the selecting, the three-dimensional data decodingdevice selects whether to use an item of attribute information of asecond node directly as the predicted value or to calculate thepredicted value from the items of attribute information of the firstnodes, the second node being included in the first nodes. For example,the second node is the parent node.

For example, the three-dimensional data decoding device obtains, fromthe bitstream, difference values of third nodes (e.g., child node group)that include the current node and belong to a same layer as the currentnode (e.g., S9111 in FIG. 79 ), and generates predicted values of thethird nodes (S9113). In the decoding (S9153), the three-dimensional datadecoding device performs the transform process on the predicted valuesof the third nodes to generate second transform coefficients (e.g.,S9114); adds a difference value among the difference values and a secondtransform coefficient among the second transform coefficients togenerate each of first transform coefficients, the difference valuecorresponding to the second transform coefficient (e.g., S9115); andperforms the inverse transform process on the first transformcoefficients to generate items of attribute information of the thirdnodes (e.g., S9116).

For example, the transform process is an integer-to-integer transform(e.g., integer Haar transform). In the generating of the secondtransform coefficients, the three-dimensional data decoding devicediscards fractional portions of the predicted values of the third nodes(e.g., S9117 in FIG. 81 ), and performs the transform process on thepredicted values after the discarding to generate the second transformcoefficients (e.g., S9114A).

For example, the transform process is an integer-to-integer transform(e.g., integer Haar transform). In the generating of the first transformcoefficients, the three-dimensional data decoding device discardsfractional portions of the second transform coefficients (e.g., S9118 inFIG. 83 ), and generates the first transform coefficients using thesecond transform coefficients after the discarding (e.g., S9115).

For example, the three-dimensional data decoding device includes aprocessor and memory. Using the memory, the processor performs theabove-described process.

Embodiment 11

In this embodiment, a region adaptive hierarchical transform (RAHT)process or Haar process based on prediction will be described. FIG. 90is a diagram for describing a prediction process, which illustrates ahierarchical structure in a RAHT or Haar process.

In a hierarchical encoding based on RAHT or Haar transform, thethree-dimensional data encoding device performs a hierarchicalpredictive encoding, which predicts an attribute value (attributeinformation) for a lower layer from an attribute value for a higherlayer and encodes a difference value between the attribute informationand a predicted value obtained by prediction. The three-dimensional dataencoding device adaptively switches, based on a certain condition,whether to perform the hierarchical predictive encoding or not. Thecertain condition may be the condition described below.

Condition 1 is that the number of valid nodes is greater than apreviously determined threshold (THnode). The three-dimensional dataencoding device applies the hierarchical predictive encoding when thenumber of valid nodes is greater than the threshold, and does not applythe hierarchical predictive encoding when the number of valid nodes issmaller than or equal to the threshold.

Here, a valid node is a node having an attribute value used forprediction among a plurality of nodes (parent nodes and neighboringparent nodes) included in a parent node group for a child node groupthat is to be encoded. In other words, a valid node is a node thatincludes a three-dimensional point or a node a descendant node (a childnode, a grandchild node or the like) of which includes athree-dimensional point. Note that a child node group includes aplurality of nodes (child nodes) to be encoded. A parent node groupincludes a parent node and a plurality of neighboring parent nodes. Aneighboring parent node is a node that belongs to the same layer as theparent node and is neighboring to the parent node.

For example, in the example shown in FIG. 90 , the valid node count,which is the total number of valid nodes included in the parent nodegroup, is 11. For example, when THnode=5, the valid node count(=11)>THnode, and therefore, the three-dimensional data encoding deviceencodes the child node group using the hierarchical predictive encoding.When THnode=12, the valid node count (=11)<=THnode, thethree-dimensional data encoding device does not encode the child nodegroup using the hierarchical predictive encoding. In this way, when thevalid node count is greater than the threshold, the three-dimensionaldata encoding device can generate a predicted value of high precisionusing the attribute value of the parent node or a neighboring parentnode and therefore can improve the encoding efficiency by applying thehierarchical predictive encoding. When the valid node count is smallerthan or equal to the threshold, the three-dimensional data encodingdevice does not apply the hierarchical predictive encoding and thereforecan reduce the processing amount.

Note that when the three-dimensional data encoding device does not applythe hierarchical predictive encoding, the three-dimensional dataencoding device applies the RAHT or Haar transform to the attributevalue of the child node group and entropy-encodes the resultingtransform coefficient.

FIG. 91 is a diagram illustrating a first example of the encodingprocess. When calculating the difference value between the attributevalue and the predicted value, the three-dimensional data encodingdevice applies the RAHT or Haar transform to each of the attribute valueand the predicted value to calculate a transform coefficient for theattribute value and a transform coefficient for the predicted value. Thethree-dimensional data encoding device determines the difference valuebetween the transform coefficient for the attribute value and thetransform coefficient for the predicted value. In this way, thedifference value to be encoded can be made smaller, and therefore, theencoding efficiency can be improved.

Note that when the predicted value is to be selected from among acalculated value and the attribute value for the parent node or aneighboring parent node (when a prediction mode is to be added to thebitstream), the three-dimensional data encoding device may calculatedifference values of the transform coefficients from predicted valuesfor each prediction mode, determine a cost value from the absolute sumof the difference values, and select a prediction mode for which thecost value is the smallest, for example. In this way, the predictionmode for which the difference value is the smallest can be appropriatelyselected, and the encoding efficiency can be improved. For example, thethree-dimensional data encoding device can calculate cost value costaccording to the following equation (Equation R1).[Math. 34]cost=Σ_(i=0) ^(m) |T _(i) −PT _(i)|+λ*Predbit  (Equation R1)

Here, m represents the number of child nodes included in a child nodegroup. λ represents an adjustment parameter. Predbit represents theamount of bits for encoding a prediction mode. Ti represents a transformcoefficient for an attribute value, and PTi represents a transformcoefficient for a predicted value. Note that the method of selecting aprediction mode is not limited to this, and a prediction mode can beselected based on other conditions or instructions from the outside, forexample.

As shown in FIG. 91 , the three-dimensional data encoding devicecalculates transform coefficients Ti for the attribute values for thechild node group by applying the RAHT or Haar transform to the attributevalues (S9501).

In the example shown in FIG. 91 , the valid node count is 2, and thevalid node count (=2)<=THnode (11, for example). In this case, thethree-dimensional data encoding device does not perform generation of apredicted value. For example, the three-dimensional data encoding deviceuses a predicted value=0.

The three-dimensional data encoding device then calculates differencevalues that are the difference between transform coefficients Ti for theattribute values and the predicted value=0 (S9502). That is, thethree-dimensional data encoding device directly outputs transformcoefficients Ti as the difference values.

The three-dimensional data encoding device then quantizes the differencevalues (transform coefficients Ti) (S9503), and arithmetically encodesthe quantized difference values (S9504), thereby generating encoded data(bitstream). Note that when using a lossless encoding, thethree-dimensional data encoding device may skip the quantization(S9504).

Note that when the valid node count>THnode, the three-dimensional dataencoding device generates a predicted value for the child node group bypredicting an attribute value for the child node group from an attributevalue for the parent node group. The three-dimensional data encodingdevice then calculates transform coefficient PTi for the predicted valueby applying the RAHT or Haar transform to the predicted value. In stepS9502, the three-dimensional data encoding device also calculatesdifference values that are the differences between the transformcoefficients Ti for the attribute values and transform coefficient PTifor the predicted value.

Next, an example of a decoding process of decoding the encoded data(bitstream) generated in the first example of the encoding processdescribed above will be described. FIG. 92 is a diagram illustrating afirst example of the decoding process.

First, the three-dimensional data decoding device arithmetically decodesthe encoded data (bitstream) (S9511), and inverse-quantizes theresulting signal (S9512) to generate difference values of the transformcoefficients for the child node group. Note that, when using a losslessdecoding (when a lossless encoding is used), the inverse quantization(S9512) may be skipped.

In the example shown in FIG. 92 , the valid node count is 2, and thevalid node count (=2)<=THnode (11, for example). In this case, thethree-dimensional data decoding device does not perform generation of apredicted value. For example, the three-dimensional data decoding deviceuses a predicted value=0.

The three-dimensional data decoding device then calculates transformcoefficients Ti for the child node group by adding the predicted value=0to the difference values of the transform coefficients for the childnode group (S9513). That is, the three-dimensional data decoding devicedirectly outputs the difference values as transform coefficients Ti.

The three-dimensional data decoding device then applies inverse RAHT orinverse Haar transform to transform coefficients Ti for the child nodegroup to generate decoded values of the attribute values for the childnode group (S9514). In this way, the three-dimensional data decodingdevice can appropriately decode the bitstream.

Note that when the valid node count>THnode, the three-dimensional datadecoding device generates a predicted value by predicting an attributevalue for the child node group from an attribute value for the parentnode group. Note that when the three-dimensional data encoding devicehas selected whether to use a calculated value or an attribute value forthe parent node or a neighboring parent node for generation of thepredicted value (when a prediction mode is added to the bitstream), thethree-dimensional data decoding device generates predicted values usingthe decoded prediction mode. The three-dimensional data decoding devicethen calculates transform coefficient PTi for the predicted value byapplying the RAHT or Haar transform to the predicted value. In stepS9513, the three-dimensional data decoding device also calculatestransform coefficients Ti for the child node group by adding transformcoefficient PTi for the predicted value to the difference values of thetransform coefficients for the child node group.

FIG. 93 is a diagram illustrating an example syntax of an attributeinformation header (attribute header). The attribute information headeris a header of attribute information included in a bitstream, and is aheader for a frame or for a plurality of frames.

As shown in FIG. 93 , the attribute information header includesRAHTPredictionFlag (hierarchical predictive encoding flag) and THnode(first threshold information). RAHTPredictionFlag is information forswitching whether or not to apply the hierarchical predictive encoding,which predicts an attribute value for a lower layer from an attributevalue for a higher layer, in the hierarchical encoding based on RAHT orHaar. RAHTPredictionFlag=1 indicates that the hierarchical predictiveencoding is to be applied. RAHTPredictionFlag=0 indicates that thehierarchical predictive encoding is not to be applied.

THnode is information for switching whether or not to apply thehierarchical encoding for each child node group. THnode is added to theattribute information header when RAHTPredictionFlag=1, and is not addedto the attribute information header when RAHTPredictionFlag=0. Thehierarchical predictive encoding is applied when the valid node count ofthe parent node group is greater than THnode, and is not applied whenthe valid node count is smaller than or equal to THnode.

FIG. 94 is a diagram illustrating another example syntax of theattribute information header. The attribute information header shown inFIG. 94 does not include RAHTPredictionFlag, although the attributeinformation header includes THnode. When the minimum value of the validnode count of the parent node is 1, the three-dimensional data encodingdevice can always apply the hierarchical predictive encoding for eachchild node group by setting THnode=0. Therefore, in this case,RAHTPredictionFlag can be omitted. Therefore, the data size of theheader can be reduced.

Note that the three-dimensional data encoding device may addRAHTPredictionFlag or THnode to the header after entropy-encodingRAHTPredictionFlag or THnode. For example, the three-dimensional dataencoding device may binarize and arithmetically encode each value.Alternatively, the three-dimensional data encoding device may encodeeach value with a fixed length in order to reduce the processing amount.

RAHTPredictionFlag or THnode does not always have to be added to theheader. For example, the value of RAHTPredictionFlag or THnode may bedefined by profile or level of a standard or the like. In this way, thebit amount of the header can be reduced.

FIG. 95 is a flowchart of a three-dimensional data encoding process (aswitching process for the hierarchical predictive encoding). First, thethree-dimensional data encoding device calculates the valid node countof the parent node group (S9521). The three-dimensional data encodingdevice then determines whether the valid node count is greater thanTHnode (S9522). When the valid node count is greater than THnode (if Yesin S9522), the three-dimensional data encoding device performs thehierarchical predictive encoding of the attribute values of the childnode group (S9523). On the other hand, when the valid node count issmaller than or equal to THnode (if No in S9522), the three-dimensionaldata encoding device performs a hierarchical non-predictive encoding ofthe attribute values of the child node group (S9524). The hierarchicalnon-predictive encoding is an encoding that does not use thehierarchical predictive encoding, and is an encoding that includes noprediction process, for example.

FIG. 96 is a flowchart of a three-dimensional data decoding process (aswitching process for the hierarchical predictive decoding). First, thethree-dimensional data decoding device calculates the valid node countof the parent node group (S9531). The three-dimensional data decodingdevice then determines whether the valid node count is greater thanTHnode (S9532).

When the valid node count is greater than THnode (if Yes in S9532), thethree-dimensional data decoding device performs a hierarchicalpredictive decoding of the attribute values of the child node group(S9533). Here, the hierarchical predictive decoding is a process ofdecoding a signal generated by the hierarchical predictive encodingdescribed above. That is, in the hierarchical predictive decoding, adecoded value (attribute value) is generated by adding a predicted valueobtained by prediction to a decoded difference value.

On the other hand, when the valid node count is smaller than or equal toTHnode (if No in S9532), the three-dimensional data decoding deviceperforms a hierarchical non-predictive decoding of the attribute valuesof the child node group (S9534). Here, the hierarchical non-predictivedecoding is a process of decoding a signal generated by the hierarchicalnon-predictive encoding described above. The hierarchical non-predictivedecoding is a decoding that does not use the hierarchical predictivedecoding, and is a decoding that includes no prediction process, forexample.

Next, a second example of the encoding process will be described. As acondition for switching whether to use the hierarchical predictiveencoding or not, condition 2 described below may be used.

Condition 2 is that the valid node count of a grandparent node group isgreater than a previously determined threshold (THpnode). Thethree-dimensional data encoding device applies the hierarchicalpredictive encoding when the valid node count of the grandparent nodegroup is greater than the threshold, and does not apply the hierarchicalpredictive encoding when the valid node count of the grandparent nodegroup is smaller than or equal to the threshold. Here, the grandparentnode group includes a grandparent node and a neighboring node of thegrandparent node. That is, the grandparent node group includes a parentnode of a parent node and a parent node of a neighboring parent node.Here, the grandparent node is a parent node of a parent node of acurrent node. That is, the valid node count of the grandparent node isthe valid node count of an encoded parent node.

Condition 1 and condition 2 may be combined. That is, it is possiblethat the three-dimensional data encoding device applies the hierarchicalpredictive encoding when the valid node count of the grandparent nodegroup is greater than threshold THpnode and the valid node count of theparent node is greater than threshold THnode, and does not apply thehierarchical predictive encoding otherwise.

FIG. 97 is a diagram illustrating a second example of the encodingprocess. For example, in the example shown in FIG. 97 , the valid nodecount of the grandparent node is 3. For example, when THpnode=1, thevalid node count of the grandparent node (=3)>THnode, and therefore, thethree-dimensional data encoding device encodes the child node groupusing the hierarchical predictive encoding. When THpnode=5, the validnode count (=3)<=THnode, and therefore, the three-dimensional dataencoding device does not encode the child node group using thehierarchical predictive encoding.

In this way, when the valid node count of the grandparent node group isgreater than the threshold, the three-dimensional data encoding devicecan generate a predicted value of high precision using the attributevalue of the parent node or a neighboring parent node and therefore canimprove the encoding efficiency by applying the hierarchical predictiveencoding. When the valid node count of the grandparent node group issmaller than or equal to the threshold, the three-dimensional dataencoding device does not apply the hierarchical predictive encoding andtherefore can reduce the processing amount.

Note that when the three-dimensional data encoding device does not applythe hierarchical predictive encoding, the three-dimensional dataencoding device applies the RAHT or Haar transform to the attributevalue of the child node group and entropy-encodes the resultingtransform coefficient, for example.

Note that when the valid node count of the grandparent node group issmaller than or equal to the threshold, the three-dimensional dataencoding device does not apply the hierarchical predictive encoding andtherefore does not have to perform the process of determining a parentnode group and calculating the valid node count of the parent nodegroup. In this way, the processing amount can be reduced. Note that whenthe three-dimensional data encoding device does not calculate the validnode count of the parent node group, the three-dimensional data encodingdevice may set the valid node count of the parent node group at 0 sothat the hierarchical predictive encoding is not applied to the childnodes of the child node group to be encoded. In this way, the processingamount can be reduced. The three-dimensional data encoding device mayrefer to the valid node count of a higher layer than the grandparentnode.

FIG. 98 is a diagram illustrating an example syntax of the attributeinformation header in the second example. The attribute informationheader shown in FIG. 98 includes THpnode (second threshold information)in addition to the components of the attribute information header shownin FIG. 93 . THpnode is information for switching whether or not toapply the hierarchical encoding for each child node group. THpnode isadded to the attribute information header when RAHTPredictionFlag=1, andis not added to the attribute information header whenRAHTPredictionFlag=0. The hierarchical predictive encoding is appliedwhen the valid node count of the grandparent node group is greater thanTHpnode, and is not applied when the valid node count of the grandparentnode group is smaller than or equal to THpnode.

FIG. 99 is a diagram illustrating another example syntax of theattribute information header. The attribute information header shown inFIG. 99 includes THpnode (second threshold information) in addition tothe components of the attribute information header shown in FIG. 94 .When the minimum value of the valid node count of the grandparent nodeis 1, the hierarchical predictive encoding can be always applied foreach child node group by setting THpnode=0. Therefore, in this case,RAHTPredictionFlag can be omitted. Therefore, the data size of theheader can be reduced.

Note that the three-dimensional data encoding device may addRAHTPredictionFlag, THpnode, or THnode to the header afterentropy-encoding RAHTPredictionFlag, THpnode, or THnode. For example,the three-dimensional data encoding device may binarize andarithmetically encode each value. Alternatively, the three-dimensionaldata encoding device may encode each value with a fixed length in orderto reduce the processing amount.

RAHTPredictionFlag, THpnode, or THnode does not always have to be addedto the header. For example, the value of RAHTPredictionFlag, THpnode, orTHnode may be defined by profile or level of a standard or the like. Inthis way, the bit amount of the header can be reduced.

FIG. 100 is a flowchart of a three-dimensional data encoding process (aswitching process for the hierarchical predictive encoding) in thesecond example. The process shown in FIG. 100 is the process shown inFIG. 95 additionally including step S9525.

First, the three-dimensional data encoding device determines whether thevalid node count of the grandparent node group is greater than THpnode(S9525). When the valid node count of the grandparent node group isgreater than THpnode (if Yes in S9525), the same processings as those inFIG. 95 (S9521 to S9524) are performed.

On the other hand, when the valid node count of the grandparent nodegroup is smaller than or equal to THpnode (if No in S9525), thethree-dimensional data encoding device performs the hierarchicalnon-predictive encoding of the attribute values of the child node group(S9524). Note that when the valid node count of the grandparent nodegroup is smaller than or equal to THpnode (if No in S9525), thethree-dimensional data encoding device may set the valid node count ofthe parent node group at 0.

When the valid node count of the grandparent node group is greater thanTHpnode (if Yes in S9525), the three-dimensional data encoding devicemay perform the hierarchical predictive encoding of the attribute valuesof the child node group (S9523) without performing steps S9521 to S9522.

FIG. 101 is a flowchart of a three-dimensional data decoding process (aswitching process for the hierarchical predictive decoding) in thesecond example. The process shown in FIG. 101 is the process shown inFIG. 96 additionally including step S9535.

First, the three-dimensional data decoding device determines whether thevalid node count of the grandparent node group is greater than THpnode(S9535). When the valid node count of the grandparent node group isgreater than THpnode (if Yes in S9535), the same processings as those inFIG. 96 (S9531 to S9534) are performed.

On the other hand, when the valid node count of the grandparent nodegroup is smaller than or equal to THpnode (if No in S9535), thethree-dimensional data decoding device performs the hierarchicalnon-predictive decoding of the attribute values of the child node group(S9534). Note that when the valid node count of the grandparent nodegroup is smaller than or equal to THpnode (if No in S9535), thethree-dimensional data decoding device may set the valid node count ofthe parent node group at 0.

When the valid node count of the grandparent node group is greater thanTHpnode (if Yes in S9535), the three-dimensional data decoding deviceperforms the hierarchical predictive decoding of the attribute values ofthe child node group (S9533) without performing steps S9531 to S9532.

Next, a third example of the encoding process will be described. As acondition for switching whether to use the hierarchical predictiveencoding or not, condition 3 described below may be used.

Condition 3 is that the layer to which the child node group belongs isgreater than a threshold (THlayer). The three-dimensional data encodingdevice applies the hierarchical predictive encoding when the layer towhich the child node group belongs is greater than the threshold, anddoes not apply the hierarchical predictive encoding when the layer towhich the child node group belongs is smaller than or equal to thethreshold. Here, the layer is a layer for which the hierarchicalencoding of the child node group to be encoded is performed with theRAHT or Haar transform, and corresponds to a value assigned to eachlayer.

FIG. 102 is a diagram illustrating a third example of the encodingprocess. For example, in the example shown in FIG. 102 , the layer towhich the parent node group belongs is 4, and the layer to which thechild node group belongs is 1. For example, when THlayer=0, layer(=1)>THlayer, and therefore, the three-dimensional data encoding deviceencodes the child node group using the hierarchical predictive encoding.When THlayer=4, layer (=1)<=THlayer, and therefore, thethree-dimensional data encoding device does not encode the child nodegroup using the hierarchical predictive encoding.

In this way, for child nodes belonging to a higher layer, for which thevalid node count tends to be greater, the three-dimensional dataencoding device can generate a predicted value of high precision usingthe attribute value of the parent node or a neighboring parent node andtherefore can improve the encoding efficiency by applying thehierarchical predictive encoding. On the other hand, when the layer issmaller than or equal to the threshold, the three-dimensional dataencoding device does not apply the hierarchical predictive encoding andtherefore can reduce the processing amount.

Note that when the three-dimensional data encoding device does not applythe hierarchical predictive encoding, the three-dimensional dataencoding device applies the RAHT or Haar transform to the attributevalue of the child node group and entropy-encodes the resultingtransform coefficient, for example.

FIG. 103 is a diagram illustrating an example syntax of the attributeinformation header in the third example. The attribute informationheader shown in FIG. 103 includes THlayer (third threshold information)in addition to the components of the attribute information header shownin FIG. 98 .

THlayer is information for switching whether or not to apply thehierarchical predictive encoding for each layer to which the child nodesbelong. THlayer is added to the attribute information header whenRAHTPredictionFlag=1, and is not added to the attribute informationheader when RAHTPredictionFlag=0. The hierarchical predictive encodingis applied when the layer to which the child node group belongs isgreater than THlayer, and is not applied when the layer to which thechild node group belongs is smaller than or equal to THlayer.

FIG. 104 is a diagram illustrating another example syntax of theattribute information header. The attribute information header shown inFIG. 104 includes THlayer (third threshold information) in addition tothe components of the attribute information header shown in FIG. 99 . Bysetting THlayer at the minimum value (−1, for example) of the layers,the hierarchical encoding can be always applied for each layer.Therefore, in this case, RAHTPredictionFlag can be omitted. Therefore,the data size of the header can be reduced. Note that THlayer [i] may beprovided for each layer i for the RAHT or Haar transform, therebyindicating, for each layer, whether the hierarchical predictive encodinghas been applied or not. In this way, an optimal threshold can beselected for each layer, and therefore, the encoding efficiency can beimproved.

Note that the three-dimensional data encoding device may addRAHTPredictionFlag, THlayer, THpnode, or THnode to the header afterentropy-encoding RAHTPredictionFlag, THlayer, THpnode, or THnode. Forexample, the three-dimensional data encoding device may binarize andarithmetically encode each value. Alternatively, the three-dimensionaldata encoding device may encode each value with a fixed length in orderto reduce the processing amount.

RAHTPredictionFlag, THlayer, THpnode, or THnode does not always have tobe added to the header. For example, the value of RAHTPredictionFlag,THlayer, THpnode, or THnode may be defined by profile or level of astandard or the like. In this way, the bit amount of the header can bereduced.

FIG. 105 is a flowchart of a three-dimensional data encoding process (aswitching process for the hierarchical predictive encoding) in the thirdexample. The process shown in FIG. 105 is the process shown in FIG. 100additionally including step S9526.

First, the three-dimensional data encoding device determines whether thelayer of the child node group is greater than THlayer (S9526). When thelayer of the child node group is greater than THlayer (if Yes in S9526),the same processings as those in FIG. 100 (S9525 and the followingsteps) are performed.

On the other hand, when the layer of the child node group is smallerthan or equal to THlayer (if No in S9526), the three-dimensional dataencoding device performs the hierarchical non-predictive encoding of theattribute values of the child node group (S9524).

When the layer of the child node group is greater than THlayer (if Yesin S9526), the three-dimensional data encoding device may perform thehierarchical predictive encoding of the attribute values of the childnode group (S9523) without performing steps S9525 and S9521 to S9522.Alternatively, the three-dimensional data encoding device may performone of step S9525 and steps S9521 to S9522, and need not perform theother.

FIG. 106 is a flowchart of a three-dimensional data decoding process (aswitching process for the hierarchical predictive decoding) in the thirdexample. The process shown in FIG. 106 is the process shown in FIG. 101additionally including step S9536.

First, the three-dimensional data decoding device determines whether thelayer of the child node group is greater than THlayer (S9536). When thelayer of the child node group is greater than THlayer (if Yes in S9536),the same processings as those in FIG. 101 (S9535 and the followingsteps) are performed.

On the other hand, when the layer of the child node group is smallerthan or equal to THlayer (if No in S9536), the three-dimensional datadecoding device performs the hierarchical non-predictive decoding of theattribute values of the child node group (S9534).

When the layer of the child node group is greater than THlayer (if Yesin S9536), the three-dimensional data decoding device may perform thehierarchical predictive decoding of the attribute values of the childnode group (S9533) without performing steps S9535 and S9531 to S9532.Alternatively, the three-dimensional data decoding device may performone of step S9535 and steps S9531 to S9532, and need not perform theother.

In the following, modifications of this embodiment will be described. Inthis embodiment, examples have been shown above in which when performingthe hierarchical encoding using the RAHT or Haar transform, whether toapply the hierarchical predictive encoding or not is switched based onany one or a combination of conditions 1, 2, and 3. However, the presentinvention is not necessarily limited to this, and whether to apply thehierarchical predictive encoding or not can be switched in any manner.

For example, it is possible that the three-dimensional data encodingdevice applies the hierarchical predictive encoding when the absolutesum of the difference values of the transform coefficients of the childnode group or the cost value is smaller than a threshold, and does notapply the hierarchical predictive encoding otherwise. In that case, thethree-dimensional data encoding device may generate, for each child nodegroup, information (PredFlag, for example) that indicates whether thehierarchical predictive encoding has been applied or not, and add thegenerated information to the bitstream. For example, PredFlag=1 when thehierarchical predictive encoding has been applied, and PrefFlag=0 whenthe hierarchical predictive encoding has not been applied. In this way,the three-dimensional data decoding device can determine whether or notto apply the hierarchical encoding for each child node by decodingPredFlag in the bitstream, and therefore can appropriately decode thebitstream.

Note that the three-dimensional data encoding device may arithmeticallyencode PredFlag after binarizing PredFlag. Alternatively, thethree-dimensional data encoding device may change the encoding table forarithmetically encoding binarized data of PredFlag according tocondition 1, 2, or 3. That is, the three-dimensional data encodingdevice may change the encoding table according to the valid node countof the parent node group, the valid node count of the grandparent node,or the layer to which the child node group belongs. In this way, theencoding efficiency can be improved by the hierarchical predictiveencoding, while reducing the bit amount of PredFlag. Note that thethree-dimensional data encoding device may combine the method thatswitches whether or not to apply the hierarchical predictive encodingbased on any one or a combination of conditions 1, 2, and 3 and themethod that uses PredFlag. In this way, the encoding efficiency can beimproved. Note that the three-dimensional data decoding device may usethe same approach as described above for selecting the encoding tableused for arithmetic decoding of PredFlag.

In this embodiment, the three-dimensional data encoding device switcheswhether or not to apply the hierarchical predictive encoding for eachchild node group or for each layer to which the child node groupbelongs. However, the present invention is not necessarily limited tothis. For example, the three-dimensional data encoding device may switchwhether or not to apply the hierarchical predictive encoding for every Nchild node groups or for every M layers. Alternatively, thethree-dimensional data encoding device may switch whether or not toapply the hierarchical predictive encoding on a basis of a larger unitthan layer, such as slice or tile. In this way, the encoding efficiencycan be improved while reducing the processing amount.

In this embodiment, examples have been shown above in which thethree-dimensional data encoding device switches whether to apply thehierarchical encoding or not. However, the present invention is notnecessarily limited to this. For example, the three-dimensional dataencoding device may change the range or number of the nodes to bereferred to and included in the parent node group according to theconditions described above, for example. FIG. 107 is a diagramillustrating an example in which the range and number of the parentnodes to be referred to are changed. For example, as shown in FIG. 107 ,the three-dimensional data encoding device may reduce the range ornumber of parent node groups to be referred to when the layer to whichthe child node group belongs is smaller than or equal to thresholdTHlayer. In this way, the amount of processing, such as the calculationof the valid nodes of the parent node group, can be reduced.

As stated above, the three-dimensional data encoding device according tothe present embodiment performs the process shown by FIG. 108 . Thethree-dimensional data encoding device: determines whether a first validnode count is greater than a first threshold value predetermined(S9541), the first valid node count being a total number of valid nodesthat are nodes each including a three-dimensional point, the valid nodesbeing included in first nodes belonging to a layer higher than a layerof a current node in an N-ary tree structure of three-dimensional pointsincluded in point cloud data, N being an integer greater than or equalto 2; when the first valid node count is greater than the firstthreshold value (YES in S9541), performs first encoding (e.g., layerpredictive encoding) on attribute information of the current node(S9542), the first encoding including a prediction process in whichsecond nodes are used, the second nodes including a parent node of thecurrent node and belonging to a same layer as the parent node; and whenthe first valid node count is less than or equal to the first thresholdvalue (NO in S9541), performs second encoding (e.g., layernon-predictive encoding) on attribute information of the current node(S9543), the second encoding not including the prediction process inwhich the second nodes are used.

According to this configuration, since the three-dimensional dataencoding device can appropriately select whether to use the firstencoding including a prediction process, the three-dimensional encodingdevice can improve the encoding efficiency.

For example, the first nodes (e.g., a parent node group) include theparent node and nodes belonging to the same layer as the parent node.

For example, the first nodes (e.g., a grandparent node group) include agrandparent node of the current node and nodes belonging to a same layeras the grandparent node.

For example, in the second encoding, a predicted value of attributeinformation of the current node is set to zero.

For example, the three-dimensional data encoding device furthergenerates a bitstream including attribute information of the currentnode encoded and first information (e.g., RAHTPredictionFlag) indicatingwhether the first encoding is applicable. For example, thethree-dimensional data encoding device performs the process shown byFIG. 108 when the first information indicates that the first encoding isapplicable; and performs the second encoding (e.g., layer non-predictiveencoding) on the attribute information of the current node when thefirst information fails to indicate that the first encoding isapplicable (when the first information indicates that the first encodingis not applicable).

For example, the three-dimensional data encoding device furthergenerates a bitstream including attribute information of the currentnode encoded and second information (e.g., THpnode or THnode) indicatingthe first threshold value.

For example, the three-dimensional data encoding device: determineswhether a second valid node count is greater than a second thresholdvalue predetermined, the second valid node count being a total number ofvalid nodes included in second nodes (e.g., a grandparent node group)including a grandparent node of the current node and nodes belonging toa same layer as the grandparent node; when the first valid node count isgreater than the first threshold value, and the second valid node countis greater than the second threshold value, performs the first encodingon attribute information of the current node; and when the first validnode count is less than or equal to the first threshold value or thesecond valid node count is less than or equal to the second thresholdvalue, performs the second encoding on attribute information of thecurrent node.

For example, the three-dimensional data encoding device incudes aprocessor and memory, and the processor performs the above process usingthe memory.

The three-dimensional data decoding device according to the presentembodiment performs the process shown by FIG. 109 . Thethree-dimensional data decoding device: determines whether a first validnode count is greater than a first threshold value predetermined(S9551), the first valid node count being a total number of valid nodesthat are nodes each including a three-dimensional point, the valid nodesbeing included in first nodes belonging to a layer higher than a layerof a current node in an N-ary tree structure of three-dimensional pointsincluded in point cloud data, N being an integer greater than or equalto 2; when the first valid node count is greater than the firstthreshold value (YES in S9551), performs first decoding on attributeinformation of the current node (S9552), the first decoding including aprediction process in which second nodes are used, the second nodesincluding a parent node of the current node and belonging to a samelayer as the parent node; and when the first valid node count is lessthan or equal to the first threshold value (NO in S9551), performssecond decoding on attribute information of the current node (S9553),the second decoding not including the prediction process in which thesecond nodes are used.

According to this configuration, since the three-dimensional datadecoding device can appropriately select whether to use the firstdecoding including a prediction process, the three-dimensional decodingdevice can improve the encoding efficiency.

For example, the first nodes (e.g., a parent node group) include theparent node and nodes belonging to the same layer as the parent node.

For example, the first nodes (e.g., a grandparent node group) include agrandparent node of the current node and nodes belonging to a same layeras the grandparent node.

For example, in the second encoding, a predicted value of attributeinformation of the current node is set to zero.

For example, the three-dimensional data decoding device further obtainsfirst information (e.g., RAHTPredictionFlag) indicating whether thefirst decoding is applicable, from a bitstream including attributeinformation of the current node encoded. For example, thethree-dimensional data decoding device performs the process shown byFIG. 109 when the first information indicates that the first decoding isapplicable; and performs the second decoding (e.g., layer non-predictiveencoding) on the attribute information of the current node when thefirst information fails to indicate that the first decoding isapplicable (when the first information indicates that the first decodingis not applicable).

For example, the three-dimensional data decoding device obtains secondinformation (e.g., THpnode or THnode) indicating the first thresholdvalue, from a bitstream including attribute information of the currentnode encoded.

For example, the three-dimensional data decoding device: determineswhether a second valid node count is greater than a second thresholdvalue predetermined, the second valid node count being a total number ofvalid nodes included in second nodes (e.g., a grandparent node group)including a grandparent node of the current node and nodes belonging toa same layer as the grandparent node; when the first valid node count isgreater than the first threshold value, and the second valid node countis greater than the second threshold value, performs the first decodingon attribute information of the current node; and when the first validnode count is less than or equal to the first threshold value or thesecond valid node count is less than or equal to the second thresholdvalue, performs the second decoding on attribute information of thecurrent node.

For example, the three-dimensional data decoding device incudes aprocessor and memory, and the processor performs the above process usingthe memory.

Note that although it has been described here that when the first validnode count is greater than the first threshold value, thethree-dimensional data encoding device performs the first encoding onthe attribute information of the current node, the first encodingincluding a prediction process in which a plurality of second nodes areused, and the second nodes including a parent node of the current nodeand belonging to the same layer as the parent node, the same approachcan be taken when the first valid node count is greater than or equal tothe first threshold. That is, when the encoding including the predictionprocess is performed when the first valid node count of the parent nodegroup is greater than or equal to the first threshold, thethree-dimensional data encoding device performs the second encoding thatdoes not include the prediction process on the attribute information ofthe current node when the first valid node count of the parent nodegroup is smaller than the first threshold.

Similarly, although it has been described that when the first valid nodecount is greater than the first threshold value, the three-dimensionaldata decoding device performs the first decoding on the attributeinformation of the current node, the first decoding including aprediction process in which a plurality of second nodes are used, andthe second nodes including a parent node of the current node andbelonging to the same layer as the parent node, the same approach can betaken when the first valid node count is greater than or equal to thefirst threshold. That is, when the decoding including the predictionprocess is performed when the first valid node count of the parent nodegroup is greater than or equal to the first threshold, thethree-dimensional data decoding device performs the second decoding thatdoes not include the prediction process on the attribute information ofthe current node when the first valid node count of the parent nodegroup is smaller than the first threshold.

A three-dimensional data encoding device, a three-dimensional datadecoding device, and the like according to the embodiments of thepresent disclosure have been described above, but the present disclosureis not limited to these embodiments.

Note that each of the processors included in the three-dimensional dataencoding device, the three-dimensional data decoding device, and thelike according to the above embodiments is typically implemented as alarge-scale integrated (LSI) circuit, which is an integrated circuit(IC). These may take the form of individual chips, or may be partiallyor entirely packaged into a single chip.

Such IC is not limited to an LSI, and thus may be implemented as adedicated circuit or a general-purpose processor. Alternatively, a fieldprogrammable gate array (FPGA) that allows for programming after themanufacture of an LSI, or a reconfigurable processor that allows forreconfiguration of the connection and the setting of circuit cellsinside an LSI may be employed.

Moreover, in the above embodiments, the structural components may beimplemented as dedicated hardware or may be realized by executing asoftware program suited to such structural components. Alternatively,the structural components may be implemented by a program executor suchas a CPU or a processor reading out and executing the software programrecorded in a recording medium such as a hard disk or a semiconductormemory.

The present disclosure may also be implemented as a three-dimensionaldata encoding method, a three-dimensional data decoding method, or thelike executed by the three-dimensional data encoding device, thethree-dimensional data decoding device, and the like.

Also, the divisions of the functional blocks shown in the block diagramsare mere examples, and thus a plurality of functional blocks may beimplemented as a single functional block, or a single functional blockmay be divided into a plurality of functional blocks, or one or morefunctions may be moved to another functional block. Also, the functionsof a plurality of functional blocks having similar functions may beprocessed by single hardware or software in a parallelized ortime-divided manner.

Also, the processing order of executing the steps shown in theflowcharts is a mere illustration for specifically describing thepresent disclosure, and thus may be an order other than the shown order.Also, one or more of the steps may be executed simultaneously (inparallel) with another step.

A three-dimensional data encoding device, a three-dimensional datadecoding device, and the like according to one or more aspects have beendescribed above based on the embodiments, but the present disclosure isnot limited to these embodiments. The one or more aspects may thusinclude forms achieved by making various modifications to the aboveembodiments that can be conceived by those skilled in the art, as wellforms achieved by combining structural components in differentembodiments, without materially departing from the spirit of the presentdisclosure.

Although only some exemplary embodiments of the present disclosure havebeen described in detail above, those skilled in the art will readilyappreciate that many modifications are possible in the exemplaryembodiments without materially departing from the novel teachings andadvantages of the present disclosure. Accordingly, all suchmodifications are intended to be included within the scope of thepresent disclosure.

INDUSTRIAL APPLICABILITY

The present disclosure is applicable to a three-dimensional dataencoding device and a three-dimensional data decoding device.

What is claimed is:
 1. A three-dimensional data encoding methodcomprising: determining whether a first valid node count is greater thanor equal to a first threshold value predetermined, the first valid nodecount being a total number of valid nodes that are nodes each includinga three-dimensional point, the valid nodes being included in first nodesbelonging to a layer higher than a layer of a current node in an N-arytree structure of three-dimensional points included in point cloud data,N being an integer greater than or equal to 2; when the first valid nodecount is greater than or equal to the first threshold value, performingfirst encoding on attribute information of the current node, the firstencoding including a prediction process in which second nodes are used,the second nodes including a parent node of the current node andbelonging to a same layer as the parent node; and when the first validnode count is less than the first threshold value, performing secondencoding on attribute information of the current node, the secondencoding not including the prediction process in which the second nodesare used.
 2. The three-dimensional data encoding method according toclaim 1, wherein the first nodes include the parent node and nodesbelonging to the same layer as the parent node.
 3. The three-dimensionaldata encoding method according to claim 2, further comprising:determining whether a second valid node count is greater than or equalto a second threshold value predetermined, the second valid node countbeing a total number of valid nodes included in second nodes including agrandparent node of the current node and nodes belonging to a same layeras the grandparent node; when the first valid node count is greater thanthe first threshold value, and the second valid node count is greaterthan or equal to the second threshold value, performing the firstencoding on attribute information of the current node; and when thefirst valid node count is less than the first threshold value or thesecond valid node count is less than the second threshold value,performing the second encoding on attribute information of the currentnode.
 4. The three-dimensional data encoding method according to claim1, wherein the first nodes include (i) a grandparent node of the currentnode and iii) nodes belonging to a same layer as the grandparent node.5. The three-dimensional data encoding method according to claim 1,wherein in the second encoding, a predicted value of attributeinformation of the current node is set to zero.
 6. The three-dimensionaldata encoding method according to claim 1, further comprising:generating a bitstream including attribute information of the currentnode encoded and first information indicating whether the first encodingis applicable.
 7. The three-dimensional data encoding method accordingto claim 1, further comprising: generating a bitstream includingattribute information of the current node encoded and second informationindicating the first threshold value.
 8. A three-dimensional datadecoding method comprising: determining whether a first valid node countis greater than or equal to a first threshold value predetermined, thefirst valid node count being a total number of valid nodes that arenodes each including a three-dimensional point, the valid nodes beingincluded in first nodes belonging to a layer higher than a layer of acurrent node in an N-ary tree structure of three-dimensional pointsincluded in point cloud data, N being an integer greater than or equalto 2; when the first valid node count is greater than or equal to thefirst threshold value, performing first decoding on attributeinformation of the current node, the first decoding including aprediction process in which second nodes are used, the second nodesincluding a parent node of the current node and belonging to a samelayer as the parent node; and when the first valid node count is lessthan the first threshold value, performing second decoding on attributeinformation of the current node, the second decoding not including theprediction process in which the second nodes are used.
 9. Thethree-dimensional data decoding method according to claim 8, wherein thefirst nodes include the parent node and nodes belonging to the samelayer as the parent node.
 10. The three-dimensional data decoding methodaccording to claim 9, further comprising: determining whether a secondvalid node count is greater than or equal to a second threshold valuepredetermined, the second valid node count being a total number of validnodes included in second nodes including a grandparent node of thecurrent node and nodes belonging to a same layer as the grandparentnode; when the first valid node count is greater than the firstthreshold value, and the second valid node count is greater than orequal to the second threshold value, performing the first decoding onattribute information of the current node; and when the first valid nodecount is less than the first threshold value or the second valid nodecount is less than the second threshold value, performing the seconddecoding on attribute information of the current node.
 11. Thethree-dimensional data decoding method according to claim 8, wherein thefirst nodes include (i) a grandparent node of the current node and (ii)nodes belonging to a same layer as the grandparent node.
 12. Thethree-dimensional data decoding method according to claim 8, wherein inthe second decoding, a predicted value of attribute information of thecurrent node is set to zero.
 13. The three-dimensional data decodingmethod according to claim 8, further comprising: obtaining firstinformation indicating whether the first decoding is applicable, from abitstream including attribute information of the current node encoded.14. The three-dimensional data decoding method according to claim 8,further comprising: obtaining second information indicating the firstthreshold value, from a bitstream including attribute information of thecurrent node encoded.
 15. A three-dimensional data encoding devicecomprising: a processor; and memory, wherein using the memory, theprocessor: determines whether a first valid node count is greater thanor equal to a first threshold value predetermined, the first valid nodecount being a total number of valid nodes that are nodes each includinga three-dimensional point, the valid nodes being included in first nodesbelonging to a layer higher than a layer of a current node in an N-arytree structure of three-dimensional points included in point cloud data,N being an integer greater than or equal to 2; when the first valid nodecount is greater than or equal to the first threshold value, performsfirst encoding on attribute information of the current node, the firstencoding including a prediction process in which second nodes are used,the second nodes including a parent node of the current node andbelonging to a same layer as the parent node; and when the first validnode count is less than the first threshold value, performs secondencoding on attribute information of the current node, the secondencoding not including the prediction process in which the second nodesare used.
 16. A three-dimensional data decoding device comprising: aprocessor; and memory, wherein using the memory, the processor:determines whether a first valid node count is greater than or equal toa first threshold value predetermined, the first valid node count beinga total number of valid nodes that are nodes each including athree-dimensional point, the valid nodes being included in first nodesbelonging to a layer higher than a layer of a current node in an N-arytree structure of three-dimensional points included in point cloud data,N being an integer greater than or equal to 2; when the first valid nodecount is greater than or equal to the first threshold value, performsfirst decoding on attribute information of the current node, the firstdecoding including a prediction process in which second nodes are used,the second nodes including a parent node of the current node andbelonging to a same layer as the parent node; and when the first validnode count is less than the first threshold value, performs seconddecoding on attribute information of the current node, the seconddecoding not including the prediction process in which the second nodesare used.